Bluetooth: Reset the pairing_cb for bredr/cross key pairing address
Reset the pairing_cb structure for bredr or cross key pairing address
only.Without this check pairing_cb state can be reset by other non
pairing bd addresses which can lead to stuck in pairing.
Change-Id: I077bebffac9df7a0c7559af58656651467158c14
diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c
index 01a80fa..a1fd4b7 100644
--- a/btif/src/btif_dm.c
+++ b/btif/src/btif_dm.c
@@ -611,7 +611,8 @@
bdcpy(pairing_cb.bd_addr, bd_addr->address);
} else {
if ((!pairing_cb.sdp_attempts)&&
- (bdcmp(bd_addr->address, pairing_cb.bd_addr) == 0))
+ ((bdcmp(bd_addr->address, pairing_cb.bd_addr) == 0) ||
+ (bdcmp(bd_addr->address, pairing_cb.static_bdaddr.address) == 0)))
memset(&pairing_cb, 0, sizeof(pairing_cb));
else
BTIF_TRACE_DEBUG("%s: BR-EDR service discovery active", __func__);