DBG("task %p", task);
reply = dbus_pending_call_steal_reply(call);
- if (reply == NULL)
- return;
if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR)
goto failed;
dbus_message_unref(reply);
+ dbus_pending_call_unref(call);
+
return;
failed:
dbus_message_unref(reply);
+ dbus_pending_call_unref(call);
+
task_list = g_slist_remove(task_list, task);
connman_device_unref(task->device);
DBG("task %p", task);
reply = dbus_pending_call_steal_reply(call);
- if (reply == NULL)
- return;
if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR) {
add_interface(task);
done:
dbus_message_unref(reply);
+
+ dbus_pending_call_unref(call);
}
static int create_interface(struct supplicant_task *task)
free_task(task);
dbus_message_unref(reply);
+
+ dbus_pending_call_unref(call);
}
static int remove_interface(struct supplicant_task *task)
task->scan_call = NULL;
reply = dbus_pending_call_steal_reply(call);
- if (reply == NULL)
- return;
if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR) {
connman_device_set_scanning(task->device, FALSE);
done:
dbus_message_unref(reply);
+
+ dbus_pending_call_unref(call);
}
DBG("task %p", task);
reply = dbus_pending_call_steal_reply(call);
- if (reply == NULL) {
- get_properties(task);
- return;
- }
- if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR) {
- dbus_message_unref(reply);
- get_properties(task);
- return;
- }
+ if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR)
+ goto unref;
memset(&result, 0, sizeof(result));
result.frequency = -1;
g_free(result.name);
g_free(result.ssid);
+unref:
dbus_message_unref(reply);
+ dbus_pending_call_unref(call);
+
get_properties(task);
}
DBG("task %p", task);
reply = dbus_pending_call_steal_reply(call);
- if (reply == NULL)
- goto noscan;
if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR)
goto done;
dbus_message_unref(reply);
+ dbus_pending_call_unref(call);
+
get_properties(task);
return;
done:
dbus_message_unref(reply);
-noscan:
+ dbus_pending_call_unref(call);
+
task->result_call = NULL;
if (task->scanning == TRUE) {