From 8a68d3c4b804b26c94b8d025c721a45cff49f82f Mon Sep 17 00:00:00 2001 From: Bartosz Szatkowski Date: Tue, 5 Jul 2011 22:53:22 +0200 Subject: [PATCH] obexd: Add proper finishing/canceling requests --- obexd/plugins/phonebook-ebook.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/obexd/plugins/phonebook-ebook.c b/obexd/plugins/phonebook-ebook.c index 181585aa2..b51d34da4 100644 --- a/obexd/plugins/phonebook-ebook.c +++ b/obexd/plugins/phonebook-ebook.c @@ -517,9 +517,17 @@ done: void phonebook_req_finalize(void *request) { struct query_context *data = request; + GSList *ebook = ebooks; DBG(""); + while (ebook != NULL) { + if (e_book_cancel(ebook->data, NULL) == TRUE) + data->queued_calls--; + + ebook = ebook->next; + } + if (data != NULL && data->queued_calls == 0) free_query_context(data); } -- 2.47.3