summaryrefslogtreecommitdiff
path: root/mesh/mesh.c
diff options
context:
space:
mode:
authorInga Stotland <inga.stotland@intel.com>2019-01-11 18:40:54 -0800
committerBrian Gix <brian.gix@intel.com>2019-01-14 14:02:09 -0800
commit1ec20825822ab9d05028f88d13bf6765dd29efe8 (patch)
tree995ae431cadd77aed23003f3f4b86c26d8697ca5 /mesh/mesh.c
parent39c2e03f1bc6865fe3ce22945a1e7e5bf47b227c (diff)
downloadbluez-1ec20825822ab9d05028f88d13bf6765dd29efe8.tar.gz
mesh: Fix reading device UUID from Join() call
Supply correct parameters to l_dbus_message_iter_get_fixed_array to get the location from where to read UUID value.
Diffstat (limited to 'mesh/mesh.c')
-rw-r--r--mesh/mesh.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesh/mesh.c b/mesh/mesh.c
index 169e6f42c..8971f7cc4 100644
--- a/mesh/mesh.c
+++ b/mesh/mesh.c
@@ -564,6 +564,7 @@ static struct l_dbus_message *join_network_call(struct l_dbus *dbus,
{
const char *app_path, *sender;
struct l_dbus_message_iter iter_uuid;
+ uint8_t *uuid;
uint32_t n;
l_debug("Join network request");
@@ -578,7 +579,7 @@ static struct l_dbus_message *join_network_call(struct l_dbus *dbus,
join_pending = l_new(struct join_data, 1);
- l_dbus_message_iter_get_fixed_array(&iter_uuid, join_pending->uuid, &n);
+ l_dbus_message_iter_get_fixed_array(&iter_uuid, &uuid, &n);
if (n != 16) {
l_free(join_pending);
@@ -587,6 +588,8 @@ static struct l_dbus_message *join_network_call(struct l_dbus *dbus,
"Bad device UUID");
}
+ memcpy(join_pending->uuid, uuid, 16);
+
sender = l_dbus_message_get_sender(msg);
join_pending->sender = l_strdup(sender);