return;
}
+ if (call == NULL) {
+ connman_error("D-Bus connection not available");
+ dbus_message_unref(message);
+ g_free(data);
+ return;
+ }
+
data->connection = connection;
data->message = message;
data->callback = callback;
return -EINVAL;
}
+ if (call == NULL) {
+ connman_error("D-Bus connection not available");
+ dbus_message_unref(message);
+ return -EINVAL;
+ }
+
dbus_pending_call_set_notify(call, connect_reply, network, NULL);
dbus_message_unref(message);
return -EINVAL;
}
+ if (call == NULL) {
+ connman_error("D-Bus connection not available");
+ dbus_message_unref(message);
+ return -EINVAL;
+ }
+
dbus_pending_call_set_notify(call, disconnect_reply, network, NULL);
dbus_message_unref(message);
return -EINVAL;
}
+ if (call == NULL) {
+ connman_error("D-Bus connection not available");
+ dbus_message_unref(message);
+ return -EINVAL;
+ }
+
dbus_pending_call_set_notify(call, powered_reply, NULL, NULL);
dbus_message_unref(message);
if (dbus_connection_send_with_reply(connection, message,
&call, TIMEOUT) == FALSE) {
connman_error("Failed to get Bluetooth adapters");
- dbus_message_unref(message);
- return;
+ goto done;
+ }
+
+ if (call == NULL) {
+ connman_error("D-Bus connection not available");
+ goto done;
}
dbus_pending_call_set_notify(call, list_adapters_reply,
connection, NULL);
+done:
dbus_message_unref(message);
}
if (dbus_connection_send_with_reply(connection, message,
&call, TIMEOUT) == FALSE) {
connman_error("Failed to get modem devices");
- dbus_message_unref(message);
- return;
+ goto done;
+ }
+
+ if (call == NULL) {
+ connman_error("D-Bus connection not available");
+ goto done;
}
dbus_pending_call_set_notify(call, enumerate_devices_reply,
NULL, NULL);
+done:
dbus_message_unref(message);
}
return -EIO;
}
+ if (call == NULL) {
+ connman_error("D-Bus connection not available");
+ dbus_message_unref(message);
+ return -EIO;
+ }
+
dbus_pending_call_set_notify(call, add_interface_reply, task, NULL);
dbus_message_unref(message);
return -EIO;
}
+ if (call == NULL) {
+ connman_error("D-Bus connection not available");
+ dbus_message_unref(message);
+ return -EIO;
+ }
+
dbus_pending_call_set_notify(call, get_interface_reply, task, NULL);
dbus_message_unref(message);
return -EIO;
}
+ if (call == NULL) {
+ connman_error("D-Bus connection not available");
+ dbus_message_unref(message);
+ return -EIO;
+ }
+
dbus_pending_call_set_notify(call, remove_interface_reply, task, NULL);
dbus_message_unref(message);
goto noscan;
}
+ if (call == NULL) {
+ connman_error("D-Bus connection not available");
+ dbus_message_unref(message);
+ goto noscan;
+ }
+
dbus_pending_call_set_notify(call, properties_reply, task, NULL);
dbus_message_unref(message);
if (task->noscan == FALSE)
connman_device_set_scanning(task->device, TRUE);
+ if (call == NULL) {
+ connman_error("D-Bus connection not available");
+ goto done;
+ }
+
dbus_pending_call_set_notify(call, scan_results_reply, task, NULL);
done: