Skip to content
Commit f62a40be authored by Michal Narajowski's avatar Michal Narajowski Committed by Carles Cufi
Browse files

Bluetooth: Fix callback handling in ECC Public Key generation



Commit d6c34c46 changed the behavior
slightly but didn't update the documentation. The callback will now be
reset to NULL once the key is generated. Calling bt_pub_key_gen()
multiple times before the key is finished would result in creation of an
infinite loop. This could happen when an application calls mesh_init()
and mesh_reset() in quick succession. Clarify the behavior of the API in
the documentation.

Also passing a NULL argument would result in an undefined behavior, so
add a check to match the behavior described in documentation.

Signed-off-by: default avatarMichał Narajowski <michal.narajowski@codecoup.pl>
parent 865c8188
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment