From 6f99198c41f7f5be466d942beca2e4e2c129e70d Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 29 Apr 2011 17:48:06 +0300 Subject: [PATCH] bluetooth: Fix using pointer-pointer when appending an array as variant pa_dbus_append_basic_array_variant_dict_entry should take the direct pointer to the array. --- src/modules/bluetooth/bluetooth-util.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c index 740b317..597a39d 100644 --- a/src/modules/bluetooth/bluetooth-util.c +++ b/src/modules/bluetooth/bluetooth-util.c @@ -631,11 +631,9 @@ static void register_endpoint(pa_bluetooth_discovery *y, const char *path, const if (pa_streq(uuid, HFP_AG_UUID)) { uint8_t capability = 0; - uint8_t *caps = &capability; - pa_dbus_append_basic_array_variant_dict_entry(&d, "Capabilities", DBUS_TYPE_BYTE, &caps, 1); + pa_dbus_append_basic_array_variant_dict_entry(&d, "Capabilities", DBUS_TYPE_BYTE, &capability, 1); } else { a2dp_sbc_t capabilities; - uint8_t *caps = (uint8_t *) &capabilities; capabilities.channel_mode = BT_A2DP_CHANNEL_MODE_MONO | BT_A2DP_CHANNEL_MODE_DUAL_CHANNEL | BT_A2DP_CHANNEL_MODE_STEREO | BT_A2DP_CHANNEL_MODE_JOINT_STEREO; @@ -648,7 +646,7 @@ static void register_endpoint(pa_bluetooth_discovery *y, const char *path, const capabilities.min_bitpool = MIN_BITPOOL; capabilities.max_bitpool = MAX_BITPOOL; - pa_dbus_append_basic_array_variant_dict_entry(&d, "Capabilities", DBUS_TYPE_BYTE, &caps, sizeof(capabilities)); + pa_dbus_append_basic_array_variant_dict_entry(&d, "Capabilities", DBUS_TYPE_BYTE, &capabilities, sizeof(capabilities)); } dbus_message_iter_close_container(&i, &d); -- 2.7.4