From 72c7132424817e7fb85abaaa38b1fcba6f7a8733 Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Thu, 13 Oct 2022 13:29:45 +0900 Subject: [PATCH] Fix the rssi parsing issue D/BLUETOOTH_HAL( 336): bt-hal-event-receiver.c: __bt_hal_device_properties_lookup(1793) > Device RSSI [0] Property num [6] D/BLUETOOTH_HAL( 336): bt-hal-event-receiver.c: __bt_hal_device_properties_lookup(1793) > Device RSSI [0] Property num [6] D/BLUETOOTH_HAL( 336): bt-hal-event-receiver.c: __bt_hal_device_properties_lookup(1793) > Device RSSI [0] Property num [6] Change-Id: I1efa6e609bafb368ae2ae247cebbd5b83f85edc2 Signed-off-by: Wootak Jung --- bt-oal/bluez_hal/src/bt-hal-event-receiver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bt-oal/bluez_hal/src/bt-hal-event-receiver.c b/bt-oal/bluez_hal/src/bt-hal-event-receiver.c index c30a075..df3a570 100644 --- a/bt-oal/bluez_hal/src/bt-hal-event-receiver.c +++ b/bt-oal/bluez_hal/src/bt-hal-event-receiver.c @@ -1785,8 +1785,8 @@ static void __bt_hal_device_properties_lookup(GVariant *result, char *address) g_variant_unref(tmp_value); /* RSSI*/ - tmp_value = g_variant_lookup_value(value, "RSSI", G_VARIANT_TYPE_INT32); - int rssi = tmp_value ? g_variant_get_int32(tmp_value) : 0; + tmp_value = g_variant_lookup_value(value, "RSSI", G_VARIANT_TYPE_INT16); + int rssi = tmp_value ? g_variant_get_int16(tmp_value) : 0; size += __bt_insert_hal_properties(buf + size, HAL_PROP_DEVICE_RSSI, sizeof(int), &rssi); ev->num_props++; -- 2.7.4