nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches

◆ srv_store_remove_by_conn()

int srv_store_remove_by_conn ( struct bt_conn const *const conn)

#include <applications/nrf_audio/src/bluetooth/bt_stream/unicast/server_store.h>

Remove a server by conn pointer.

Note
Depending on the application, it is strongly recommended to call this function when an unbonded (untrusted) connection is terminated or the bond for that connection is cleared. If not, the address will still be stored, and other or new connections that maliciously present the same address will be recognized as a valid, previously stored server.
This function assumes that this conn will no longer be valid. Hence, it will remove a server with a (previously) active conn.
srv_store_lock() must be called before accessing this function.
Parameters
[in]connConnection to the server to be removed.
Return values
0Success.
-EACCESServer has active conn.
Othernegative. Errors from underlying functions.