Bluetooth: Mesh: Clarify name length in bt_mesh_model_data_store

Name length can't be longer than 8 bytes. This needs to be clarified
in the bt_mesh_model_data_store() documentation.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit is contained in:
Pavel Vasilyev 2021-08-10 16:41:25 +02:00 committed by Christopher Friedt
commit 538f97f737
2 changed files with 5 additions and 4 deletions

View file

@ -618,7 +618,8 @@ static inline bool bt_mesh_model_in_primary(const struct bt_mesh_model *mod)
*
* @param mod Mesh model.
* @param vnd This is a vendor model.
* @param name Name/key of the settings item.
* @param name Name/key of the settings item. Only
* @ref SETTINGS_MAX_DIR_DEPTH bytes will be used at most.
* @param data Model data to store, or NULL to delete any model data.
* @param data_len Length of the model data.
*

View file

@ -1222,7 +1222,7 @@ int bt_mesh_model_data_store(struct bt_mesh_model *mod, bool vnd,
encode_mod_path(mod, vnd, "data", path, sizeof(path));
if (name) {
strcat(path, "/");
strncat(path, name, 8);
strncat(path, name, SETTINGS_MAX_DIR_DEPTH);
}
if (data_len) {