diff options
-rw-r--r-- | include/bluetooth_type.h | 1 | ||||
-rw-r--r-- | src/bluetooth-common.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/bluetooth_type.h b/include/bluetooth_type.h index a2e4001..89c46f5 100644 --- a/include/bluetooth_type.h +++ b/include/bluetooth_type.h @@ -221,6 +221,7 @@ typedef enum { BT_DEVICE_DISCONNECT_REASON_TIMEOUT, /**< Disconnected by timeout */ BT_DEVICE_DISCONNECT_REASON_LOCAL_HOST, /**< Disconnected by local host */ BT_DEVICE_DISCONNECT_REASON_REMOTE, /**< Disconnected by remote */ + BT_DEVICE_DISCONNECT_REASON_MIC_FAILURE, /**< Disconnected by MIC failure (Since 9.0) */ } bt_device_disconnect_reason_e; /** diff --git a/src/bluetooth-common.c b/src/bluetooth-common.c index 015bf36..adfce28 100644 --- a/src/bluetooth-common.c +++ b/src/bluetooth-common.c @@ -985,6 +985,9 @@ static int __bt_get_bt_device_connection_info_s(bt_device_connection_info_s **de case (int)BLUETOOTH_ERROR_LOCAL_HOST_TERM: (*dest)->disconn_reason = BT_DEVICE_DISCONNECT_REASON_LOCAL_HOST; break; + case (int)BLUETOOTH_ERROR_CONNECTION_TERMINATED_DUE_TO_MIC_FAILURE: + (*dest)->disconn_reason = BT_DEVICE_DISCONNECT_REASON_MIC_FAILURE; + break; default: (*dest)->disconn_reason = BT_DEVICE_DISCONNECT_REASON_UNKNOWN; break; |