Hi Mikel, On Tue, Jan 31, 2012 at 5:28 AM, Mikel Astiz <mikel.astiz@xxxxxxxxxxxx> wrote: >> -struct pending_data { >> - session_callback_t cb; >> +struct pending_request { >> struct obc_session *session; >> struct obc_transfer *transfer; >> + session_callback_t auth_complete; > > > I don't see the need to have a GError* as a parameter to the auth_complete > ballback. It looks like a type reuse, but I'd suggest replacing the callback > type with another specific one. Yep, we can use GCallback or something similar, gonna fix that. >> /* Unregister any pending transfer */ >> - while (l) { >> - struct obc_transfer *transfer = l->data; >> - >> - l = l->next; >> - >> - obc_session_remove_transfer(session, transfer); >> - } >> + while ((p = g_queue_pop_head(session->queue))) >> + pending_request_free(p); > > > Would it simpler to use g_queue_foreach just like in session_free? Yep gonna fix this too. >> >> - pending->cb(pending->session, NULL, transfer); >> - g_free(pending); >> + p->auth_complete(p->session, NULL, transfer); > > > It seems like (auth_complete != NULL) should be checked here, or otherwise > the check in session_request_reply should be removed. Yep -- 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