dbus_error_init(&error);
+ if (dbus_set_error_from_message(&error, reply) == TRUE) {
+ connman_error("%s", error.message);
+ dbus_error_free(&error);
+ goto done;
+ }
+
if (dbus_message_get_args(reply, &error,
DBUS_TYPE_STRING, &interface,
DBUS_TYPE_INVALID) == FALSE) {
dbus_error_init(&error);
+ if (dbus_set_error_from_message(&error, reply) == TRUE) {
+ connman_error("%s", error.message);
+ dbus_error_free(&error);
+ goto done;
+ }
+
if (dbus_message_get_args(reply, &error, DBUS_TYPE_INVALID) == FALSE) {
if (dbus_error_is_set(&error) == TRUE) {
connman_error("%s", error.message);
dbus_error_init(&error);
+ if (dbus_set_error_from_message(&error, reply) == TRUE) {
+ connman_error("%s", error.message);
+ dbus_error_free(&error);
+ goto done;
+ }
+
if (dbus_message_get_args(reply, &error,
DBUS_TYPE_ARRAY, DBUS_TYPE_OBJECT_PATH,
&adapters, &num_adapters,
static void powered_reply(DBusPendingCall *call, void *user_data)
{
+ DBusError error;
DBusMessage *reply;
DBG("");
reply = dbus_pending_call_steal_reply(call);
- dbus_message_unref(reply);
+ dbus_error_init(&error);
+ if (dbus_set_error_from_message(&error, reply) == TRUE) {
+ connman_error("%s", error.message);
+ dbus_error_free(&error);
+ dbus_message_unref(reply);
+ dbus_pending_call_unref(call);
+ return;
+ }
+
+ dbus_message_unref(reply);
dbus_pending_call_unref(call);
add_adapter(connection, user_data);