BT_ERR("Error returned in method call");
if (err) {
BT_ERR("Error = %s", err->message);
- if (strcmp(err->message, BT_ERROR_ALREADY_EXIST) == 0)
+ g_dbus_error_strip_remote_error(err);
+ if (g_strrstr(err->message, BT_ERROR_ALREADY_EXIST))
ret = BLUETOOTH_ERROR_IN_PROGRESS;
else
ret = BLUETOOTH_ERROR_INTERNAL;
BT_ERR("Error returned in method call");
if (err) {
BT_ERR("Error = %s", err->message);
- if (strcmp(err->message, BT_ERROR_NOT_AVAILABLE) == 0)
+ g_dbus_error_strip_remote_error(err);
+ if (g_strrstr(err->message, BT_ERROR_NOT_AVAILABLE))
ret = BLUETOOTH_ERROR_NOT_IN_OPERATION;
else
ret = BLUETOOTH_ERROR_INTERNAL;