From e75e82772dfaa06257ca7145dd0ba5ce7b9ecb30 Mon Sep 17 00:00:00 2001 From: Dmitriy Paliy Date: Mon, 11 Jul 2011 00:01:15 +0300 Subject: [PATCH] obexd: Fix finalize request in callback function Request shall be finalized in cache_ready_notify callback function. Otherwise, reference to the request is kept until vobject is closed. It is correct in current implementation since there are no nested backend requests when pulling vcard listing. However, this contradicts to current design (see phonebook_size_result, query_result, cache_entry_done) and may cause problems if such implementation would be needed. --- obexd/plugins/pbap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c index 7eedfe009..e14a58d12 100644 --- a/obexd/plugins/pbap.c +++ b/obexd/plugins/pbap.c @@ -487,6 +487,9 @@ static void cache_ready_notify(void *user_data) DBG(""); + phonebook_req_finalize(pbap->obj->request); + pbap->obj->request = NULL; + pbap->cache.valid = TRUE; generate_response(pbap); -- 2.47.3