This also fixes the one wrong interface name in events.c.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/connect.c | 2 +-
src/connect.h | 2 ++
src/events.c | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/connect.c b/src/connect.c
index b44d247..45fb2ae 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -258,7 +258,7 @@ virtDBusConnectNew(virtDBusConnect **connectp,
r = sd_bus_add_object_vtable(connect->bus,
NULL,
connect->connectPath,
- "org.libvirt.Connect",
+ VIRT_DBUS_CONNECT_INTERFACE,
virt_connect_vtable,
connect);
if (r < 0)
diff --git a/src/connect.h b/src/connect.h
index 46e8c9a..9078ae7 100644
--- a/src/connect.h
+++ b/src/connect.h
@@ -5,6 +5,8 @@
#include <libvirt/libvirt.h>
#include <systemd/sd-bus.h>
+#define VIRT_DBUS_CONNECT_INTERFACE "org.libvirt.Connect"
+
struct virtDBusConnect {
sd_bus *bus;
const char *uri;
diff --git a/src/events.c b/src/events.c
index ca1418b..eee068c 100644
--- a/src/events.c
+++ b/src/events.c
@@ -54,7 +54,7 @@ virtDBusEventsDomainLifecycle(virConnectPtr connection
VIRT_ATTR_UNUSED,
r = sd_bus_message_new_signal(connect->bus,
&message,
connect->connectPath,
- "org.libvirt.connect",
+ VIRT_DBUS_CONNECT_INTERFACE,
signal);
if (r < 0)
return r;
--
2.14.3