[dbus PATCH 06/10] Rename callback_ids variable to domain_callback_ids

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The callback_ids var is domain specific.
Renaming it now, so as to keep consistent naming when introducing
events for other entities.

Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx>
---
 src/connect.c |  8 ++++----
 src/connect.h |  2 +-
 src/events.c  | 16 ++++++++--------
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/connect.c b/src/connect.c
index f22f682..90172e3 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -40,12 +40,12 @@ virtDBusConnectClose(virtDBusConnect *connect,
 {
 
     for (gint i = 0; i < VIR_DOMAIN_EVENT_ID_LAST; i += 1) {
-        if (connect->callback_ids[i] >= 0) {
+        if (connect->domain_callback_ids[i] >= 0) {
             if (deregisterEvents) {
                 virConnectDomainEventDeregisterAny(connect->connection,
-                                                   connect->callback_ids[i]);
+                                                   connect->domain_callback_ids[i]);
             }
-            connect->callback_ids[i] = -1;
+            connect->domain_callback_ids[i] = -1;
         }
     }
 
@@ -429,7 +429,7 @@ virtDBusConnectNew(virtDBusConnect **connectp,
     g_mutex_init(&connect->lock);
 
     for (gint i = 0; i < VIR_DOMAIN_EVENT_ID_LAST; i += 1)
-        connect->callback_ids[i] = -1;
+        connect->domain_callback_ids[i] = -1;
 
     connect->bus = bus;
     connect->uri = uri;
diff --git a/src/connect.h b/src/connect.h
index 7ed84b8..e69898c 100644
--- a/src/connect.h
+++ b/src/connect.h
@@ -17,7 +17,7 @@ struct virtDBusConnect {
     virConnectPtr connection;
     GMutex lock;
 
-    gint callback_ids[VIR_DOMAIN_EVENT_ID_LAST];
+    gint domain_callback_ids[VIR_DOMAIN_EVENT_ID_LAST];
 };
 typedef struct virtDBusConnect virtDBusConnect;
 
diff --git a/src/events.c b/src/events.c
index c6896d4..5fa61f5 100644
--- a/src/events.c
+++ b/src/events.c
@@ -175,14 +175,14 @@ virtDBusDomainEventsRegisterEvent(virtDBusConnect *connect,
                                   gint id,
                                   virConnectDomainEventGenericCallback callback)
 {
-    g_assert(connect->callback_ids[id] == -1);
-
-    connect->callback_ids[id] = virConnectDomainEventRegisterAny(connect->connection,
-                                                                 NULL,
-                                                                 id,
-                                                                 VIR_DOMAIN_EVENT_CALLBACK(callback),
-                                                                 connect,
-                                                                 NULL);
+    g_assert(connect->domain_callback_ids[id] == -1);
+
+    connect->domain_callback_ids[id] = virConnectDomainEventRegisterAny(connect->connection,
+                                                                        NULL,
+                                                                        id,
+                                                                        VIR_DOMAIN_EVENT_CALLBACK(callback),
+                                                                        connect,
+                                                                        NULL);
 }
 
 void
-- 
2.15.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux