*
* Connection Manager
*
- * Copyright (C) 2007-2009 Intel Corporation. All rights reserved.
+ * Copyright (C) 2007-2010 Intel Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
else
error = NULL;
- if (dbus_message_iter_init(reply, &iter) == FALSE)
- goto done;
+ dbus_message_iter_init(reply, &iter);
if (data->function != NULL)
data->function(error, &iter, data->user_data);
-done:
dbus_message_unref(reply);
dbus_pending_call_unref(call);
if (connection == NULL)
return -EINVAL;
- if (path == NULL || interface == NULL)
- return -EINVAL;
-
- if (method == NULL || setup == NULL)
+ if (path == NULL || interface == NULL || method == NULL)
return -EINVAL;
data = dbus_malloc0(sizeof(*data));
dbus_message_set_auto_start(message, FALSE);
dbus_message_iter_init_append(message, &iter);
- setup(&iter, user_data);
+ if (setup != NULL)
+ setup(&iter, user_data);
if (dbus_connection_send_with_reply(connection, message,
&call, TIMEOUT) == FALSE) {