Fix infinite callback issue in EOF status
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-common.c
index b4ace2a..fe1c23a 100644 (file)
@@ -2487,6 +2487,22 @@ int _bt_get_error_value_from_message(const char *error_message)
                return BLUETOOTH_ERROR_INTERNAL;
 }
 
+char *_bt_print_gio_status(GIOStatus status)
+{
+       switch (status) {
+       case G_IO_STATUS_ERROR:
+               return "G_IO_STATUS_ERROR";
+       case G_IO_STATUS_NORMAL:
+               return "G_IO_STATUS_NORMAL";
+       case G_IO_STATUS_EOF:
+               return "G_IO_STATUS_EOF";
+       case G_IO_STATUS_AGAIN:
+               return "G_IO_STATUS_AGAIN";
+       }
+
+       return "Unknown";
+}
+
 BT_EXPORT_API int bluetooth_is_supported(void)
 {
        int is_supported = 0;