From a6b5edd8dcba4fa673fdeca4c44d6efb3a89872c Mon Sep 17 00:00:00 2001 From: Vinicius Costa Gomes Date: Tue, 26 Jan 2010 19:04:19 -0300 Subject: [PATCH] obexd: Fix error code response when there's no default vCard The correct error code when there's no default vCard for OPP should be NOT_FOUND. --- obexd/plugins/opp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/obexd/plugins/opp.c b/obexd/plugins/opp.c index 59e0eb0f2..d531e3c49 100644 --- a/obexd/plugins/opp.c +++ b/obexd/plugins/opp.c @@ -192,8 +192,11 @@ static void opp_get(obex_t *obex, obex_object_t *obj) goto fail; if (g_str_equal(os->type, VCARD_TYPE)) { - if (os_prepare_get(os, VCARD_FILE, &size) < 0) - goto fail; + if (os_prepare_get(os, VCARD_FILE, &size) < 0) { + OBEX_ObjectSetRsp(obj, OBEX_RSP_NOT_FOUND, + OBEX_RSP_NOT_FOUND); + return; + } } else goto fail; -- 2.47.3