2011-07-07 12:19:57

by Dmitriy Paliy

[permalink] [raw]
Subject: [PATCH obexd v2 0/1] Fix finalize request in callback function

Hi,

Commit message is update in this version and being sent as an independent
patch.

BR,
Dmitriy



2011-07-10 07:50:37

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH obexd v2] Fix finalize request in callback function

Hi Dmitriy,

On Thu, Jul 07, 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(-)

This one doesn't apply to latest git.

Johan

2011-07-07 12:19:58

by Dmitriy Paliy

[permalink] [raw]
Subject: [PATCH obexd v2] Fix finalize request in callback function

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 0356ae7..bbd06c7 100644
--- a/plugins/pbap.c
+++ b/plugins/pbap.c
@@ -490,6 +490,9 @@ static void cache_ready_notify(void *user_data)

DBG("");

+ phonebook_req_finalize(pbap->obj->request);
+ pbap->obj->request = NULL;
+
pbap->cache.valid = TRUE;

err = generate_response(pbap);
--
1.7.4.1