From f49508460508b6d85a254846793d22ee27e0f167 Mon Sep 17 00:00:00 2001 From: Rafal Michalski Date: Fri, 1 Jul 2011 13:42:42 +0200 Subject: [PATCH] obexd: Return empty body instead -ENOENT when phonebook is empty Previously, when doing pull of empty phonebook, NOT FOUND error was returned. Now returning empty body - this change is needed to pass PTS testcase TC_PSE_PDF_BV_05_I (this testcase is optional). PBAP spec says, that error NOT_FOUND should be returned when phonebook object could not be found - very strict clients may think that phonebook does not exist (and in scenario described above phonebook exists but its content is empty). --- obexd/plugins/pbap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c index 0356ae7ec..ab1d9ce3b 100644 --- a/obexd/plugins/pbap.c +++ b/obexd/plugins/pbap.c @@ -301,7 +301,7 @@ static void query_result(const char *buffer, size_t bufsize, int vcards, pbap->obj->lastpart = lastpart; - if (vcards <= 0) { + if (vcards < 0) { obex_object_set_io_flags(pbap->obj, G_IO_ERR, -ENOENT); return; } -- 2.47.3