Diff between 98359ac58234f9e81ea63a3d9da73c6734f9490f and 77f1e5fd0decd1726a86746fe6b0e497c8673cd1

Changed Files

File Additions Deletions Status
obexd/plugins/phonebook-ebook.c +10 -0 modified

Full Patch

diff --git a/obexd/plugins/phonebook-ebook.c b/obexd/plugins/phonebook-ebook.c
index 140ca78..153ea95 100644
--- a/obexd/plugins/phonebook-ebook.c
+++ b/obexd/plugins/phonebook-ebook.c
@@ -141,7 +141,17 @@ static void ebookpull_cb(EBook *book, EBookStatus estatus, GList *contacts,
 		goto done;
 	}
 
+	/*
+	 * When MaxListCount s zero, PCE wants to know the number of used
+	 * indexes in the phonebook of interest. All other parameters that
+	 * may be present in the request shall be ignored.
+	 */
 	maxcount = data->params->maxlistcount;
+	if (maxcount == 0) {
+		count = g_list_length(contacts);
+		goto done;
+	}
+
 	l = g_list_nth(contacts, data->params->liststartoffset);
 
 	/* FIXME: Missing 0.vcf */