summaryrefslogtreecommitdiff
path: root/mesh/mesh.c
diff options
context:
space:
mode:
authorPrzemysław Fierek <przemyslaw.fierek@silvair.com>2020-04-09 21:47:30 +0200
committerBrian Gix <brian.gix@intel.com>2020-04-10 06:06:30 -0700
commitd5cc4ffd555c37da8c66575a58788524ee2bfb7a (patch)
tree632b35d54c8600afc5ffa5631a07c566e278f589 /mesh/mesh.c
parent427033253de3493268d2d60a0b78be69d6f008da (diff)
downloadbluez-d5cc4ffd555c37da8c66575a58788524ee2bfb7a.tar.gz
mesh: Fix invalid app_path on 'Join'
This patch fixes invalid app_path on 'Join' method call - the daemon tried to use the value of app_root API argument, while it should use path discovered by scanning result of GetManagedObjects() call.
Diffstat (limited to 'mesh/mesh.c')
-rw-r--r--mesh/mesh.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mesh/mesh.c b/mesh/mesh.c
index 247c3c9be..34fe6881e 100644
--- a/mesh/mesh.c
+++ b/mesh/mesh.c
@@ -72,7 +72,6 @@ struct join_data{
struct l_dbus_message *msg;
struct mesh_agent *agent;
char *sender;
- const char *app_path;
struct mesh_node *node;
uint32_t disc_watch;
uint8_t *uuid;
@@ -445,7 +444,7 @@ static bool prov_complete_cb(void *user_data, uint8_t status,
return false;
owner = join_pending->sender;
- path = join_pending->app_path;
+ path = node_get_app_path(join_pending->node);
if (status == PROV_ERR_SUCCESS &&
!node_add_pending_local(join_pending->node, info))
@@ -551,7 +550,6 @@ static struct l_dbus_message *join_network_call(struct l_dbus *dbus,
join_pending->sender = l_strdup(sender);
join_pending->msg = l_dbus_message_ref(msg);
- join_pending->app_path = app_path;
/* Try to create a temporary node */
node_join(app_path, sender, join_pending->uuid, node_init_cb);