Fix gnss 8122 and IPC socket.

Change-Id: Id413efb4dd8df3e5a52333cc0c1400db7f84ad9f
diff --git a/mbtk/mbtk_gnssd/gnss_main.c b/mbtk/mbtk_gnssd/gnss_main.c
index 3922f8f..b3ab5c6 100755
--- a/mbtk/mbtk_gnssd/gnss_main.c
+++ b/mbtk/mbtk_gnssd/gnss_main.c
@@ -17,6 +17,7 @@
 #include "gnss_hd8122.h"
 
 #define GNSS_DEBUG 1
+#define GNSS_UBUS_ENABLE 0
 
 #define GNSS_TAG "MBTK_GNSS"
 #define GNSS_BUFF_SIZE 2048
@@ -36,7 +37,12 @@
 
 gnss_info_t gnss_info;
 
+#if GNSS_UBUS_ENABLE
 struct ubus_context *gnss_ubus_init(void);
+#else
+int gnss_ipc_service_start();
+#endif
+
 int gnss_init_config(int fd);
 
 static char gnss_buff[GNSS_BUFF_SIZE*2] = {0};
@@ -742,7 +748,7 @@
         gnss_info.gnss_fw_dl = gnss_8122_fw_dl;
         gnss_info.gnss_dl_read_cb = NULL;
         gnss_info.gnss_set = gnss_8122_set;
-        gnss_info.gnss_set_cb = NULL;
+        gnss_info.gnss_set_cb = gnss_8122_set_cb;
     } else {
         LOGE("No support : %s", argv[1]);
         return -1;
@@ -758,12 +764,23 @@
     }
 
     // Init ubus and waitting IPC commands.
+#if GNSS_UBUS_ENABLE
     if(gnss_ubus_init()) {
         LOGD("main() run...");
         uloop_run();
     } else {
         LOGE("gnss_ubus_init() fail.");
     }
+#else
+    if(!gnss_ipc_service_start()) {
+        LOGD("main() run...");
+        while(1) {
+            sleep(24 * 60 * 60);
+        }
+    } else {
+        LOGE("gnss_ipc_service_start() fail.");
+    }
+#endif
 
     LOGD("main() exit.");
     return 0;