Re: [PATCH obexd] opp: Emit TransferStarted signal only if stream start is success

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jaganath,

On Mon, Apr 30, 2012 at 2:11 PM, Jaganath Kanakkassery
<jaganath.k@xxxxxxxxxxx> wrote:
> Even if obex_put_stream_start() fails TransferStarted signal will be
> emitted where as transfer start is actually failed.
> ---
>  plugins/opp.c |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/plugins/opp.c b/plugins/opp.c
> index fa3ee91..c7ddc63 100644
> --- a/plugins/opp.c
> +++ b/plugins/opp.c
> @@ -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);
> --
> 1.7.1

Applied, thanks.

-- 
Luiz Augusto von Dentz
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux