Diff between b2652ad70e9c8140d998ff47f3bbd52175faff5c and 49db95b2dea6fbd2b02eaddc11ff4cf1db67ae45
Changed Files
| File | Additions | Deletions | Status |
| obexd/plugins/pbap.c | +9 | -0 | modified |
Full Patch
diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c
index 11cb678..3ea7d6b 100644
--- a/obexd/plugins/pbap.c
+++ b/obexd/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;
}