mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 13:14:32 +02:00
fix(ble/bluedroid): Fix issue causing BTM_GetSecurityFlags failed
This commit is contained in:
@@ -675,6 +675,7 @@ tBTM_SEC_DEV_REC *btm_find_oldest_dev (void)
|
|||||||
|
|
||||||
/* All devices are paired; find the oldest */
|
/* All devices are paired; find the oldest */
|
||||||
for (p_node = list_begin(btm_cb.p_sec_dev_rec_list); p_node; p_node = list_next(p_node)) {
|
for (p_node = list_begin(btm_cb.p_sec_dev_rec_list); p_node; p_node = list_next(p_node)) {
|
||||||
|
p_dev_rec = list_node(p_node);
|
||||||
if ((p_dev_rec->sec_flags & BTM_SEC_IN_USE) == 0) {
|
if ((p_dev_rec->sec_flags & BTM_SEC_IN_USE) == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@@ -342,7 +342,12 @@ BOOLEAN BTM_GetSecurityFlags (BD_ADDR bd_addr, UINT8 *p_sec_flags)
|
|||||||
*p_sec_flags = (UINT8) p_dev_rec->sec_flags;
|
*p_sec_flags = (UINT8) p_dev_rec->sec_flags;
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
BTM_TRACE_ERROR ("BTM_GetSecurityFlags false");
|
|
||||||
|
BTM_TRACE_ERROR("%s: BTM_GetSecurityFlags failed for device [%02X:%02X:%02X:%02X:%02X:%02X]",
|
||||||
|
__func__,
|
||||||
|
bd_addr[0], bd_addr[1], bd_addr[2],
|
||||||
|
bd_addr[3], bd_addr[4], bd_addr[5]);
|
||||||
|
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -369,7 +374,12 @@ BOOLEAN BTM_GetSecurityFlagsByTransport (BD_ADDR bd_addr, UINT8 *p_sec_flags,
|
|||||||
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
BTM_TRACE_ERROR ("BTM_GetSecurityFlags false\n");
|
|
||||||
|
BTM_TRACE_ERROR("%s: BTM_GetSecurityFlags failed for device [%02X:%02X:%02X:%02X:%02X:%02X]",
|
||||||
|
__func__,
|
||||||
|
bd_addr[0], bd_addr[1], bd_addr[2],
|
||||||
|
bd_addr[3], bd_addr[4], bd_addr[5]);
|
||||||
|
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user