[Problem] Even though LE RPA device is not paired, operation failed
error code (BLUETOOTH_ERROR_INTERNAL) is reported.
[Cause & Measure] Check error->message and report BLUETOOTH_ERROR_NOT_PAIRED
when LE RPA device is not bonded
[Checking Method] N/A
Change-Id: I726c389c8f2cc0d9458a803ac4bb3463a9e25b60
G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
if (result == NULL) {
BT_ERR("Failed to get device ID address");
G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
if (result == NULL) {
BT_ERR("Failed to get device ID address");
+
+ ret = BLUETOOTH_ERROR_INTERNAL;
+ g_dbus_error_strip_remote_error(error);
BT_ERR("Error occured in Proxy call [%s]", error->message);
BT_ERR("Error occured in Proxy call [%s]", error->message);
+ if (g_strcmp0(error->message, "Does Not Exist") == 0)
+ ret = BLUETOOTH_ERROR_NOT_PAIRED;
g_error_free(error);
}
g_object_unref(device_proxy);
g_error_free(error);
}
g_object_unref(device_proxy);
- return BLUETOOTH_ERROR_INTERNAL;
}
g_variant_get(result , "(&s)", &idaddress);
}
g_variant_get(result , "(&s)", &idaddress);
- if (idaddress == NULL) {
- BT_ERR("No paired device");
- ret = BLUETOOTH_ERROR_NOT_PAIRED;
- } else {
- DBG_SECURE("ID Address : %s", idaddress);
- _bt_convert_addr_string_to_type(id_address->addr, idaddress);
- }
+
+ DBG_SECURE("ID Address : %s", idaddress);
+ _bt_convert_addr_string_to_type(id_address->addr, idaddress);
g_variant_unref(result);
g_object_unref(device_proxy);
g_variant_unref(result);
g_object_unref(device_proxy);