File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -567,9 +567,25 @@ ble_hs_resolv_list_add(uint8_t *cmdbuf)
567567 addr_type = cmdbuf [0 ];
568568 ident_addr = cmdbuf + 1 ;
569569
570+ /*--------------------------------------------------------------------------------*/
571+ /* Temporary workaround to resolve an issue when deinitializing the stack
572+ * and reinitializing. If the a peer deletes the bonding info after deiniting
573+ * it will not be able to re-bond without this. Awaiting upstream fix.
574+ */
575+ /*
570576 if (ble_hs_is_on_resolv_list(ident_addr, addr_type)) {
571577 return BLE_HS_EINVAL;
572578 }
579+ */
580+ int position = ble_hs_is_on_resolv_list (ident_addr , addr_type );
581+ if (position ) {
582+ memmove (& g_ble_hs_resolv_list [position ],
583+ & g_ble_hs_resolv_list [position + 1 ],
584+ (g_ble_hs_resolv_data .rl_cnt - position ) * sizeof (struct
585+ ble_hs_resolv_entry ));
586+ -- g_ble_hs_resolv_data .rl_cnt ;
587+ }
588+ /*--------------------------------------------------------------------------------*/
573589
574590 rl = & g_ble_hs_resolv_list [g_ble_hs_resolv_data .rl_cnt ];
575591 memset (rl , 0 , sizeof (* rl ));
You can’t perform that action at this time.
0 commit comments