Skip to content
Commit 972d4c73 authored by Théo Battrel's avatar Théo Battrel Committed by Benjamin Cabé
Browse files

Bluetooth: Host: GAP Device Name write now add null char at the end



The function used to write the value of the GAP Device Name
characteristic now ensure that the string passed to `bt_set_name` is
null terminated.

Also fix a wrong offset calculation.

The function used to write the value of the GAP Device Name
characteristic was returning an error when the offset + the length of
data to write was superior **or equal** to the maximum size of the
device name.

This caused the actual maximum device name size to be reduced by 1 byte.

Signed-off-by: default avatarThéo Battrel <theo.battrel@nordicsemi.no>
parent 7884b929
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment