From d6460922289b5ea00f2876b9cf4afe3851c74246 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 19 Oct 2008 06:17:35 +0200 Subject: [PATCH] obexd: Check for phonebook MIME type --- obexd/src/pbap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/obexd/src/pbap.c b/obexd/src/pbap.c index fa12f12b3..9c2126a45 100644 --- a/obexd/src/pbap.c +++ b/obexd/src/pbap.c @@ -34,6 +34,8 @@ #include "logging.h" #include "obex.h" +#define PHONEBOOK_TYPE "x-bt/phonebook" + static void test_phonebook(void) { struct phonebook_context *context; @@ -62,10 +64,10 @@ void pbap_get(obex_t *obex, obex_object_t *obj) if (os == NULL) return; - if (os->name) + if (os->type == NULL) goto fail; - if (os->type == NULL) + if (g_str_equal(os->type, PHONEBOOK_TYPE) == FALSE) goto fail; test_phonebook(); -- 2.47.3