Notification was faling as Gatt serv info was NULL
[platform/core/connectivity/bluetooth-frwk.git] / bt-oal / bluez_hal / src / bt-hal-gatt-server.c
index fa29c69..b95d6a4 100644 (file)
@@ -2638,11 +2638,12 @@ static gboolean __bt_gatt_get_service_state(const char *service_path)
 {
        struct gatt_service_info *svc_info = NULL;
        GSList *l = NULL;
-
        for (l = gatt_services; l; l = g_slist_next(l)) {
 
                svc_info = (struct gatt_service_info *)l->data;
-               if (svc_info->serv_path == service_path) {
+
+
+               if (!g_strcmp0(svc_info->serv_path, service_path)) {
                        DBG("Return the state of the gatt service %d",
                                        svc_info->is_svc_registered);
                        return svc_info->is_svc_registered;