linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH obexd v3] Fix finalize request in callback function
@ 2011-07-10 21:01 Dmitriy Paliy
  2011-07-10 21:01 ` Dmitriy Paliy
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitriy Paliy @ 2011-07-10 21:01 UTC (permalink / raw)
  To: linux-bluetooth

This is rebased version, no structural changes.

Br,
Dmitriy


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH obexd v3] Fix finalize request in callback function
  2011-07-10 21:01 [PATCH obexd v3] Fix finalize request in callback function Dmitriy Paliy
@ 2011-07-10 21:01 ` Dmitriy Paliy
  2011-07-10 22:17   ` Johan Hedberg
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitriy Paliy @ 2011-07-10 21:01 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Dmitriy Paliy

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH obexd v3] Fix finalize request in callback function
  2011-07-10 21:01 ` Dmitriy Paliy
@ 2011-07-10 22:17   ` Johan Hedberg
  0 siblings, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2011-07-10 22:17 UTC (permalink / raw)
  To: Dmitriy Paliy; +Cc: linux-bluetooth, Dmitriy Paliy

Hi Dmitriy,

On Mon, Jul 11, 2011, Dmitriy Paliy wrote:
> 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(-)

Applied after I fixed your author info (it was @gmail.com) and minor
spelling issue (shell/shall) in the commit message. Thanks.

Johan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-10 22:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-10 21:01 [PATCH obexd v3] Fix finalize request in callback function Dmitriy Paliy
2011-07-10 21:01 ` Dmitriy Paliy
2011-07-10 22:17   ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).