From 8db3fa12d447400bdfb0a3b217df07d6e69f8723 Mon Sep 17 00:00:00 2001 From: Anupam Roy Date: Wed, 30 Jan 2019 12:11:28 +0530 Subject: [PATCH] Print out Device Disconnect Reason Change-Id: I048a5db2b231c91decd43e079a0e91ce7488f2cc Signed-off-by: Anupam Roy --- src/bluetooth-common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bluetooth-common.c b/src/bluetooth-common.c index 6f62ed5..87e3b73 100644 --- a/src/bluetooth-common.c +++ b/src/bluetooth-common.c @@ -746,6 +746,8 @@ static int __bt_get_bt_device_connection_info_s(bt_device_connection_info_s **de break; } + BT_INFO("Disconnect reason from FRWK[0x%x]", source->disc_reason); + switch (source->disc_reason) { /* After ACR for BT_DEVICE_DISCONNECT_REASON_AUTH_FAILED, will enable this code */ #if 0 @@ -754,6 +756,7 @@ static int __bt_get_bt_device_connection_info_s(bt_device_connection_info_s **de break; #endif case (int)BLUETOOTH_ERROR_CONNECTION_TIMEOUT: + BT_INFO("Disconnected due to Timeout"); (*dest)->disconn_reason = BT_DEVICE_DISCONNECT_REASON_TIMEOUT; break; case (int)BLUETOOTH_ERROR_REMOTE_USER_TERM: @@ -769,6 +772,7 @@ static int __bt_get_bt_device_connection_info_s(bt_device_connection_info_s **de break; } + BT_INFO("Disconnected reason to app [0x%x]", (*dest)->disconn_reason); return BT_ERROR_NONE; } -- 2.7.4