Fix the rssi parsing issue 87/282887/1
authorWootak Jung <wootak.jung@samsung.com>
Thu, 13 Oct 2022 04:29:45 +0000 (13:29 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Thu, 13 Oct 2022 04:33:46 +0000 (13:33 +0900)
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 <wootak.jung@samsung.com>
bt-oal/bluez_hal/src/bt-hal-event-receiver.c

index c30a0756313b6e7f69b1261fc6aa038e9d81fd80..df3a57005b5c958eeaf9783f9b6993be5a9f8a15 100644 (file)
@@ -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++;