Diff between d6fcf6aba92d431b155beb1f3da57059a3240be2 and 22c4dfafe926193372be74dccef9cdf00721b807

Changed Files

File Additions Deletions Status
obexd/src/main.c +23 -0 modified

Full Patch

diff --git a/obexd/src/main.c b/obexd/src/main.c
index 7f62331..8fc5618 100644
--- a/obexd/src/main.c
+++ b/obexd/src/main.c
@@ -46,6 +46,7 @@
 
 #include "logging.h"
 #include "bluetooth.h"
+#include "phonebook.h"
 #include "obexd.h"
 #include "obex.h"
 
@@ -58,6 +59,26 @@
 
 static GMainLoop *main_loop = NULL;
 
+static void test_phonebook(void)
+{
+	struct phonebook_context *context;
+	struct phonebook_driver *driver;
+
+	driver = phonebook_get_driver(NULL);
+	if (driver == NULL)
+		return;
+
+	context = g_try_new0(struct phonebook_context, 1);
+	if (context == NULL)
+		return;
+
+	driver->create(context);
+
+	driver->destroy(context);
+
+	g_free(context);
+}
+
 static void tty_init(int service, const gchar *root_path, const gchar *capability,
 		const gchar *devnode)
 {
@@ -227,6 +248,8 @@ int main(int argc, char *argv[])
 
 	plugin_init();
 
+	test_phonebook();
+
 	if (option_root == NULL)
 		option_root = g_strdup(DEFAULT_ROOT_PATH);