|
|
43fe83 |
From 580b26c2c30c28ef417009f08296ffa43bb76e0c Mon Sep 17 00:00:00 2001
|
|
|
43fe83 |
Message-Id: <580b26c2c30c28ef417009f08296ffa43bb76e0c.1381871412.git.jdenemar@redhat.com>
|
|
|
43fe83 |
From: Eric Blake <eblake@redhat.com>
|
|
|
43fe83 |
Date: Mon, 14 Oct 2013 16:45:10 +0100
|
|
|
43fe83 |
Subject: [PATCH] tests: work with older dbus
|
|
|
43fe83 |
|
|
|
43fe83 |
For
|
|
|
43fe83 |
|
|
|
43fe83 |
https://bugzilla.redhat.com/show_bug.cgi?id=1018730
|
|
|
43fe83 |
|
|
|
43fe83 |
On RHEL 5, with dbus 1.1.2, compilation failed with:
|
|
|
43fe83 |
|
|
|
43fe83 |
virsystemdmock.c: In function 'dbus_connection_send_with_reply_and_block':
|
|
|
43fe83 |
virsystemdmock.c:68: warning: implicit declaration of function 'dbus_message_set_serial'
|
|
|
43fe83 |
|
|
|
43fe83 |
Fix this by instead bypassing all attempts to use a dbus serial.
|
|
|
43fe83 |
|
|
|
43fe83 |
* tests/virsystemdmock.c (dbus_message_set_reply_serial): Add new
|
|
|
43fe83 |
override.
|
|
|
43fe83 |
(dbus_connection_send_with_reply_and_block): No longer bother with
|
|
|
43fe83 |
the serial.
|
|
|
43fe83 |
|
|
|
43fe83 |
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
43fe83 |
(cherry picked from commit edfae3dccf5eceeb86e1c4304dca8a8ed0f74e57)
|
|
|
43fe83 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
43fe83 |
---
|
|
|
43fe83 |
tests/virsystemdmock.c | 8 ++++++--
|
|
|
43fe83 |
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
|
43fe83 |
|
|
|
43fe83 |
diff --git a/tests/virsystemdmock.c b/tests/virsystemdmock.c
|
|
|
43fe83 |
index b6c3695..ded52d2 100644
|
|
|
43fe83 |
--- a/tests/virsystemdmock.c
|
|
|
43fe83 |
+++ b/tests/virsystemdmock.c
|
|
|
43fe83 |
@@ -58,6 +58,12 @@ dbus_bool_t dbus_connection_set_watch_functions(DBusConnection *connection ATTRI
|
|
|
43fe83 |
return 1;
|
|
|
43fe83 |
}
|
|
|
43fe83 |
|
|
|
43fe83 |
+dbus_bool_t dbus_message_set_reply_serial(DBusMessage *message ATTRIBUTE_UNUSED,
|
|
|
43fe83 |
+ dbus_uint32_t serial ATTRIBUTE_UNUSED)
|
|
|
43fe83 |
+{
|
|
|
43fe83 |
+ return 1;
|
|
|
43fe83 |
+}
|
|
|
43fe83 |
+
|
|
|
43fe83 |
DBusMessage *dbus_connection_send_with_reply_and_block(DBusConnection *connection ATTRIBUTE_UNUSED,
|
|
|
43fe83 |
DBusMessage *message,
|
|
|
43fe83 |
int timeout_milliseconds ATTRIBUTE_UNUSED,
|
|
|
43fe83 |
@@ -65,8 +71,6 @@ DBusMessage *dbus_connection_send_with_reply_and_block(DBusConnection *connectio
|
|
|
43fe83 |
{
|
|
|
43fe83 |
DBusMessage *reply = NULL;
|
|
|
43fe83 |
|
|
|
43fe83 |
- dbus_message_set_serial(message, 7);
|
|
|
43fe83 |
-
|
|
|
43fe83 |
if (getenv("FAIL_BAD_SERVICE"))
|
|
|
43fe83 |
reply = dbus_message_new_error(message,
|
|
|
43fe83 |
"org.freedesktop.systemd.badthing",
|
|
|
43fe83 |
--
|
|
|
43fe83 |
1.8.3.2
|
|
|
43fe83 |
|