/**
* virDBusCreateReplyV:
- * @msg: the message to reply to
* @reply: pointer to be filled with a method reply message
* @types: type signature for following method arguments
* @args: method arguments
* as variadic args. See virDBusCreateMethodV for a
* description of this parameter.
*/
-int virDBusCreateReplyV(DBusMessage *msg,
- DBusMessage **reply,
+int virDBusCreateReplyV(DBusMessage **reply,
const char *types,
va_list args)
{
int ret = -1;
- if (!(*reply = dbus_message_new_method_return(msg))) {
+ if (!(*reply = dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_RETURN))) {
virReportOOMError();
goto cleanup;
}
/**
* virDBusCreateReply:
- * @msg: the message to reply to
* @reply: pointer to be filled with a method reply message
* @types: type signature for following method arguments
* @...: method arguments
* See virDBusCreateReplyV for a description of the
* behaviour of this method.
*/
-int virDBusCreateReply(DBusMessage *msg,
- DBusMessage **reply,
+int virDBusCreateReply(DBusMessage **reply,
const char *types, ...)
{
va_list args;
int ret;
va_start(args, types);
- ret = virDBusCreateReplyV(msg, reply, types, args);
+ ret = virDBusCreateReplyV(reply, types, args);
va_end(args);
return ret;
return -1;
}
-int virDBusCreateReplyV(DBusMessage *msg ATTRIBUTE_UNUSED,
- DBusMessage **reply ATTRIBUTE_UNUSED,
+int virDBusCreateReplyV(DBusMessage **reply ATTRIBUTE_UNUSED,
const char *types ATTRIBUTE_UNUSED,
va_list args ATTRIBUTE_UNUSED)
{
return -1;
}
-int virDBusCreateReply(DBusMessage *msg ATTRIBUTE_UNUSED,
- DBusMessage **reply ATTRIBUTE_UNUSED,
+int virDBusCreateReply(DBusMessage **reply ATTRIBUTE_UNUSED,
const char *types ATTRIBUTE_UNUSED, ...)
{
virReportError(VIR_ERR_INTERNAL_ERROR,
if (nargs == 1 &&
STREQ(type, "ipv4") &&
STREQ(args[0], "-L")) {
- if (virDBusCreateReply(message,
- &reply,
+ if (virDBusCreateReply(&reply,
"s", TEST_FILTER_TABLE_LIST) < 0)
goto error;
} else if (nargs == 3 &&
STREQ(args[0], "-t") &&
STREQ(args[1], "nat") &&
STREQ(args[2], "-L")) {
- if (virDBusCreateReply(message,
- &reply,
+ if (virDBusCreateReply(&reply,
"s", TEST_NAT_TABLE_LIST) < 0)
goto error;
} else {
- if (virDBusCreateReply(message,
- &reply,
+ if (virDBusCreateReply(&reply,
"s", "success") < 0)
goto error;
}