Handle ACL Disconnect Reason
[platform/core/connectivity/bluetooth-frwk.git] / bt-oal / bluez_hal / src / bt-hal-dbus-common-utils.c
index c9a7812..7230e49 100644 (file)
@@ -1160,6 +1160,21 @@ char * _bt_hal_convert_disc_reason_to_string(int reason)
        }
 }
 
+int _bt_hal_convert_disc_reason_to_status(int reason)
+{
+       switch (reason) {
+       case 1:
+               return BT_STATUS_CONN_TOUT; //"Link loss"
+       case 2:
+               return BT_STATUS_CONN_TERM_LOCAL_HOST; //"Connection terminated by local host";
+       case 3:
+               return BT_STATUS_CONN_TERM_RMT_HOST; //"Connection terminated by local host";
+       case 0:
+       default:
+               return BT_STATUS_FAIL;
+       }
+}
+
 void _bt_hal_logging_connection(gboolean connect, int addr_type)
 {
        static int le_conn = 0;
@@ -1747,7 +1762,7 @@ int _bt_hal_discover_service_uuids(char *address, char *remote_uuid)
 
                if (size > 0) {
                        uuid_value = (char **)g_variant_get_strv(temp_value, &size);
-                       DBG("Size items %d", size);
+                       DBG("Size items %zu", size);
                }
 
                if (temp_value)