Diff between ce6d0771cc7ddf441202e3af5cb31eed6686eb57 and d6460922289b5ea00f2876b9cf4afe3851c74246

Changed Files

File Additions Deletions Status
obexd/src/pbap.c +4 -2 modified

Full Patch

diff --git a/obexd/src/pbap.c b/obexd/src/pbap.c
index fa12f12..9c2126a 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();