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:
parent
03c3a31be9
commit
538f97f737
2 changed files with 5 additions and 4 deletions
|
@ -618,15 +618,16 @@ 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.
|
||||
*
|
||||
* @return 0 on success, or (negative) error code on failure.
|
||||
*/
|
||||
int bt_mesh_model_data_store(struct bt_mesh_model *mod, bool vnd,
|
||||
const char *name, const void *data,
|
||||
size_t data_len);
|
||||
const char *name, const void *data,
|
||||
size_t data_len);
|
||||
|
||||
/** @brief Let a model extend another.
|
||||
*
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue