diff options
author | Inga Stotland <inga.stotland@intel.com> | 2019-02-13 19:45:25 -0800 |
---|---|---|
committer | Brian Gix <brian.gix@intel.com> | 2019-02-19 08:54:07 -0800 |
commit | 52b840d0a5cc93194cc20d3b1d8c922229720d12 (patch) | |
tree | 25052b48e40769e3d8601ddf3883972b98eae197 /mesh/appkey.h | |
parent | 19bf426290835fa5ef5fd37a2fe03b0f88f4d430 (diff) | |
download | bluez-52b840d0a5cc93194cc20d3b1d8c922229720d12.tar.gz |
mesh: Separate functions for app key add and update
This splits appkey_key_add() into two separate functions:
app_key_add() and app_key_update().
Fix checks for miscellaneous invalid conditions and return
appropriate error status.
Diffstat (limited to 'mesh/appkey.h')
-rw-r--r-- | mesh/appkey.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mesh/appkey.h b/mesh/appkey.h index 21bc6a70e..eda82ac3b 100644 --- a/mesh/appkey.h +++ b/mesh/appkey.h @@ -35,7 +35,9 @@ const uint8_t *appkey_get_key(struct mesh_net *net, uint16_t app_idx, uint8_t *key_id); bool appkey_have_key(struct mesh_net *net, uint16_t app_idx); int appkey_key_add(struct mesh_net *net, uint16_t net_idx, uint16_t app_idx, - const uint8_t *new_key, bool update); + const uint8_t *new_key); +int appkey_key_update(struct mesh_net *net, uint16_t net_idx, uint16_t app_idx, + const uint8_t *new_key); int appkey_key_delete(struct mesh_net *net, uint16_t net_idx, uint16_t app_idx); void appkey_delete_bound_keys(struct mesh_net *net, uint16_t net_idx); uint8_t appkey_list(struct mesh_net *net, uint16_t net_idx, uint8_t *buf, |