[PATCH obexd v3] Fix finalize request in callback function

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

 



Request shell 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.
---
 plugins/pbap.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/plugins/pbap.c b/plugins/pbap.c
index 7eedfe0..e14a58d 100644
--- a/plugins/pbap.c
+++ b/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);
-- 
1.7.4.1

--
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