From: Przemysław Fierek Date: Thu, 9 Apr 2020 19:47:30 +0000 (+0200) Subject: mesh: Fix invalid app_path on 'Join' X-Git-Tag: accepted/tizen/unified/20200529.124353~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd8ffe9e81d2b891474ab9db821f17999c34c01d;p=platform%2Fupstream%2Fbluez.git 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. Change-Id: I4a7c8587d06e16aca7a6a081a6711a9fec52e872 Signed-off-by: Abhay Agarwal --- diff --git a/mesh/mesh.c b/mesh/mesh.c index 4993a67..ecb49b7 100644 --- a/mesh/mesh.c +++ b/mesh/mesh.c @@ -71,7 +71,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; @@ -444,7 +443,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)) @@ -550,7 +549,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);