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;
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;
}