Hi Mikel, On Mon, Feb 13, 2012 at 4:39 PM, Mikel Astiz <mikel.astiz.oss@xxxxxxxxx> wrote: > From: Mikel Astiz <mikel.astiz@xxxxxxxxxxxx> > > The authorization request of a queued transfer could fail, and this > needs to be reported to the transfer initiator. Otherwise it would > likely result in D-Bus timeouts. > --- > client/session.c | 13 +++++++++++++ > 1 files changed, 13 insertions(+), 0 deletions(-) > > diff --git a/client/session.c b/client/session.c > index cb46510..ea707b3 100644 > --- a/client/session.c > +++ b/client/session.c > @@ -734,6 +734,19 @@ static void session_process_queue(struct obc_session *session) > return; > } > > + if (p->func) { > + GError *gerr; > + > + obc_session_ref(session); > + g_set_error(&gerr, OBEX_IO_ERROR, err, > + "Authorization failed"); > + > + p->func(session, gerr, p->data); > + > + g_error_free(gerr); > + obc_session_unref(session); Im afraid the ref need to be taken before the while to protect against the callback calling session_shutdown and end up freeing the session. -- 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