diff options
author | Inga Stotland <inga.stotland@intel.com> | 2019-02-21 22:31:46 -0800 |
---|---|---|
committer | Brian Gix <brian.gix@intel.com> | 2019-02-28 08:54:47 -0800 |
commit | ddb5ed791827f4c39f077266c3a581eac6c78393 (patch) | |
tree | 5a02ad29500d63af123ad8e5c7d7888eb33a0bbc /mesh/mesh.c | |
parent | ae44c8f7c2b38789425ae3f993013cbc0ad02a9c (diff) | |
download | bluez-ddb5ed791827f4c39f077266c3a581eac6c78393.tar.gz |
mesh: Re-arrange node cleanup functions
Rename node_free() to node_remove() and consolidate clean up operations.
Change declarations for internally used functions to static.
Diffstat (limited to 'mesh/mesh.c')
-rw-r--r-- | mesh/mesh.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/mesh/mesh.c b/mesh/mesh.c index c610582c0..0f3c3c9fd 100644 --- a/mesh/mesh.c +++ b/mesh/mesh.c @@ -362,10 +362,8 @@ static void free_pending_join_call(bool failed) mesh_agent_remove(join_pending->agent); - if (failed) { - storage_remove_node_config(join_pending->node); - node_free(join_pending->node); - } + if (failed) + node_remove(join_pending->node); l_free(join_pending); join_pending = NULL; @@ -703,13 +701,13 @@ static struct l_dbus_message *attach_call(struct l_dbus *dbus, static void setup_network_interface(struct l_dbus_interface *iface) { l_dbus_interface_method(iface, "Join", 0, join_network_call, "", - "oay", "app", "uuid"); + "oay", "app", "uuid"); l_dbus_interface_method(iface, "Cancel", 0, cancel_join_call, "", ""); l_dbus_interface_method(iface, "Attach", 0, attach_call, - "oa(ya(qa{sv}))", "ot", "node", "configuration", - "app", "token"); + "oa(ya(qa{sv}))", "ot", "node", + "configuration", "app", "token"); /* TODO: Implement Leave method */ } @@ -720,7 +718,7 @@ bool mesh_dbus_init(struct l_dbus *dbus) setup_network_interface, NULL, false)) { l_info("Unable to register %s interface", - MESH_NETWORK_INTERFACE); + MESH_NETWORK_INTERFACE); return false; } |