Fix 64bit build error
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-gatt-client.c
index 539f543..07daf0b 100644 (file)
@@ -2119,6 +2119,18 @@ static gboolean  bluetooth_gatt_client_notify_channel_watch_cb(GIOChannel *gio,
                BT_ERR("chr_info is invalid");
                return FALSE;
        }
+
+       if (cond & (G_IO_NVAL | G_IO_HUP | G_IO_ERR)) {
+               BT_ERR("Error : GIOCondition %d, [%s]", cond, chr_info->UUID);
+               g_io_channel_shutdown(gio, TRUE, NULL);
+               g_io_channel_unref(gio);
+
+               gatt_characteristic_notify_list = g_slist_remove(gatt_characteristic_notify_list, chr_info);
+               g_free(chr_info);
+
+               return FALSE;
+       }
+
        if (cond & G_IO_IN) {
                GIOStatus status = G_IO_STATUS_NORMAL;
                GError *err = NULL;
@@ -2177,17 +2189,6 @@ static gboolean  bluetooth_gatt_client_notify_channel_watch_cb(GIOChannel *gio,
                return TRUE;
        }
 
-       if (cond & (G_IO_NVAL | G_IO_HUP | G_IO_ERR)) {
-               BT_ERR("Error : GIOCondition %d, [%s]", cond, chr_info->UUID);
-               g_io_channel_shutdown(gio, TRUE, NULL);
-               g_io_channel_unref(gio);
-
-               gatt_characteristic_notify_list = g_slist_remove(gatt_characteristic_notify_list, chr_info);
-               g_free(chr_info);
-
-               return FALSE;
-       }
-
        return TRUE;
 }