obexd: Emit TransferStarted signal only if stream start is success

Even if obex_put_stream_start() fails TransferStarted signal will be
emitted where as transfer start is actually failed.
This commit is contained in:
Jaganath Kanakkassery 2012-04-30 16:41:41 +05:30 committed by Marcel Holtmann
parent 936153406b
commit 1e9bca91cc

View File

@ -154,12 +154,15 @@ skip_auth:
path = g_build_filename(folder, name, NULL);
manager_emit_transfer_started(os);
err = obex_put_stream_start(os, path);
g_free(path);
if (err < 0)
goto failed;
manager_emit_transfer_started(os);
failed:
g_free(folder);
g_free(name);