* [PATCH 0/1 v3] Fix obexd crash for empty listing invalid cache
@ 2010-10-28 8:43 Dmitriy Paliy
2010-10-28 8:43 ` [PATCH " Dmitriy Paliy
0 siblings, 1 reply; 3+ messages in thread
From: Dmitriy Paliy @ 2010-10-28 8:43 UTC (permalink / raw)
To: linux-bluetooth
Hi,
In this revision comments are improved to be more consitent and more
focused on the bug fixed. Todo note is removed since there is already
similar fixme note in pbap_setpath function.
BR,
Dmitriy
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v3] Fix obexd crash for empty listing invalid cache
2010-10-28 8:43 [PATCH 0/1 v3] Fix obexd crash for empty listing invalid cache Dmitriy Paliy
@ 2010-10-28 8:43 ` Dmitriy Paliy
2010-10-28 17:51 ` Johan Hedberg
0 siblings, 1 reply; 3+ messages in thread
From: Dmitriy Paliy @ 2010-10-28 8:43 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Dmitriy Paliy
This fixes obexd crash in 3-way calling scenario when filtered listing
response is empty. Valid cache and empty pbap buffer mean that cache was
already attempted to be created within a single session, but no data was
available. Hence, it is not notified and no such file error returned.
Such avoids clearing and creating a new cache operations for each incoming
call, which is one of possible solution to fix this bug. It can be
extensive for large phone books. New cache is not created within current
obex session or unless path is changed.
---
plugins/pbap.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/plugins/pbap.c b/plugins/pbap.c
index 11cb678..3ea7d6b 100644
--- a/plugins/pbap.c
+++ b/plugins/pbap.c
@@ -751,6 +751,15 @@ static void *vobject_list_open(const char *name, int oflag, mode_t mode,
/* PullvCardListing always get the contacts from the cache */
if (pbap->cache.valid) {
+ /*
+ * Valid cache and empty buffer mean that cache was already
+ * created within a single session, but no data is available.
+ */
+ if (!pbap->buffer) {
+ ret = -ENOENT;
+ goto fail;
+ }
+
cache_ready_notify(pbap);
goto done;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] Fix obexd crash for empty listing invalid cache
2010-10-28 8:43 ` [PATCH " Dmitriy Paliy
@ 2010-10-28 17:51 ` Johan Hedberg
0 siblings, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2010-10-28 17:51 UTC (permalink / raw)
To: Dmitriy Paliy; +Cc: linux-bluetooth
Hi Dmitriy,
On Thu, Oct 28, 2010, Dmitriy Paliy wrote:
> This fixes obexd crash in 3-way calling scenario when filtered listing
> response is empty. Valid cache and empty pbap buffer mean that cache was
> already attempted to be created within a single session, but no data was
> available. Hence, it is not notified and no such file error returned.
>
> Such avoids clearing and creating a new cache operations for each incoming
> call, which is one of possible solution to fix this bug. It can be
> extensive for large phone books. New cache is not created within current
> obex session or unless path is changed.
> ---
> plugins/pbap.c | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
Pushed upstream. Thanks.
Johan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-10-28 17:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-28 8:43 [PATCH 0/1 v3] Fix obexd crash for empty listing invalid cache Dmitriy Paliy
2010-10-28 8:43 ` [PATCH " Dmitriy Paliy
2010-10-28 17:51 ` 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).