Changeset
src/bhyve/bhyve_driver.c           | 15 ++----
src/conf/object_event.c            |  3 ++
src/lxc/lxc_driver.c               | 24 ++++------
src/lxc/lxc_process.c              |  9 ++--
src/network/bridge_driver.c        | 15 ++----
src/node_device/node_device_udev.c |  6 +--
src/qemu/qemu_domain.c             |  3 +-
src/remote/remote_driver.c         | 75 +++++++++++++-----------------
src/secret/secret_driver.c         |  9 ++--
src/storage/storage_driver.c       | 27 ++++-------
src/test/test_driver.c             |  3 --
src/vz/vz_sdk.c                    |  3 +-
12 files changed, 73 insertions(+), 119 deletions(-)
Git apply log
Switched to a new branch 'cover.1528741339.git.aharter@redhat.com'
Applying: events: add NULL check in virObjectEventStateQueue
Applying: events: move NULL check to EventStateQueueRemote
Applying: events: remove remoteEventQueue wrapper function
To https://github.com/patchew-project/libvirt
 * [new tag]         patchew/cover.1528741339.git.aharter@redhat.com -> patchew/cover.1528741339.git.aharter@redhat.com
Test passed: syntax-check

loading

[libvirt] [PATCH libvirt 0/3] events: clean up NULL checking involving virObjectEventStateQueueRemote
Posted by Anya Harter, 1 week ago
Currently, all virObjectEventStateQueue callers and
virObjectEventStateQueueRemote callers need to do NULL checking.

In this patch series, all NULL checking has been moved to 
virObjectEventStateQueueRemote and all callers of the Remote or 
not Remote function have their NULL checking removed.

Anya Harter (3):
  events: add NULL check in virObjectEventStateQueue
  events: move NULL check to EventStateQueueRemote
  events: remove remoteEventQueue wrapper function

 src/bhyve/bhyve_driver.c           | 15 ++----
 src/conf/object_event.c            |  3 ++
 src/lxc/lxc_driver.c               | 24 ++++------
 src/lxc/lxc_process.c              |  9 ++--
 src/network/bridge_driver.c        | 15 ++----
 src/node_device/node_device_udev.c |  6 +--
 src/qemu/qemu_domain.c             |  3 +-
 src/remote/remote_driver.c         | 75 +++++++++++++-----------------
 src/secret/secret_driver.c         |  9 ++--
 src/storage/storage_driver.c       | 27 ++++-------
 src/test/test_driver.c             |  3 --
 src/vz/vz_sdk.c                    |  3 +-
 12 files changed, 73 insertions(+), 119 deletions(-)

-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH libvirt 0/3] events: clean up NULL checking involving virObjectEventStateQueueRemote
Posted by Pavel Hrdina, 1 week ago
On Mon, Jun 11, 2018 at 03:38:16PM -0400, Anya Harter wrote:
> Currently, all virObjectEventStateQueue callers and
> virObjectEventStateQueueRemote callers need to do NULL checking.
> 
> In this patch series, all NULL checking has been moved to 
> virObjectEventStateQueueRemote and all callers of the Remote or 
> not Remote function have their NULL checking removed.
> 
> Anya Harter (3):
>   events: add NULL check in virObjectEventStateQueue
>   events: move NULL check to EventStateQueueRemote
>   events: remove remoteEventQueue wrapper function

I've tweaked the commit messages and pushed it.  Congratulation on your
first libvirt contribution! :)

One note, the same cleanup as for remote driver can be done for test
driver and the testObjectEventQueue() function.

Pavel
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH libvirt 0/3] events: clean up NULL checking involving virObjectEventStateQueueRemote
Posted by Anya Harter, 1 week ago

On 06/12/2018 01:36 AM, Pavel Hrdina wrote:
> On Mon, Jun 11, 2018 at 03:38:16PM -0400, Anya Harter wrote:
>> Currently, all virObjectEventStateQueue callers and
>> virObjectEventStateQueueRemote callers need to do NULL checking.
>>
>> In this patch series, all NULL checking has been moved to 
>> virObjectEventStateQueueRemote and all callers of the Remote or 
>> not Remote function have their NULL checking removed.
>>
>> Anya Harter (3):
>>   events: add NULL check in virObjectEventStateQueue
>>   events: move NULL check to EventStateQueueRemote
>>   events: remove remoteEventQueue wrapper function
> 
> I've tweaked the commit messages and pushed it.  Congratulation on your
> first libvirt contribution! :)


Thanks!
> 
> One note, the same cleanup as for remote driver can be done for test
> driver and the testObjectEventQueue() function.

Yes, my intent is to repeat this cleanup with testObjectEventQueue,
libxlDomainEventQueue, qemuDomainEventQueue, and umlDomainEventQueue.
I was going to send the four as a patch series once they were done.

This task was laid out on the BiteSizedTasks page
https://wiki.libvirt.org/page/BiteSizedTasks#Remove_NULL_checking_around_EventStateQueue.


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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH libvirt 1/3] events: add NULL check in virObjectEventStateQueue
Posted by Anya Harter, 1 week ago
And remove NULL checking from all callers

Signed-off-by: Anya Harter <aharter@redhat.com>
---
 src/bhyve/bhyve_driver.c           | 15 +++++----------
 src/conf/object_event.c            |  3 +++
 src/lxc/lxc_driver.c               | 24 ++++++++----------------
 src/lxc/lxc_process.c              |  9 +++------
 src/network/bridge_driver.c        | 15 +++++----------
 src/node_device/node_device_udev.c |  6 ++----
 src/qemu/qemu_domain.c             |  3 +--
 src/secret/secret_driver.c         |  9 +++------
 src/storage/storage_driver.c       | 27 +++++++++------------------
 src/test/test_driver.c             |  3 ---
 src/vz/vz_sdk.c                    |  3 +--
 11 files changed, 40 insertions(+), 77 deletions(-)

diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index 97e8d4eb37..9284b51783 100644
--- a/src/bhyve/bhyve_driver.c
+++ b/src/bhyve/bhyve_driver.c
@@ -566,8 +566,7 @@ bhyveDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flag
     virDomainDefFree(def);
     virDomainDefFree(oldDef);
     virDomainObjEndAPI(&vm);
-    if (event)
-        virObjectEventStateQueue(privconn->domainEventState, event);
+    virObjectEventStateQueue(privconn->domainEventState, event);
 
     return dom;
 }
@@ -616,8 +615,7 @@ bhyveDomainUndefine(virDomainPtr domain)
 
  cleanup:
     virDomainObjEndAPI(&vm);
-    if (event)
-        virObjectEventStateQueue(privconn->domainEventState, event);
+    virObjectEventStateQueue(privconn->domainEventState, event);
     return ret;
 }
 
@@ -896,8 +894,7 @@ bhyveDomainCreateWithFlags(virDomainPtr dom,
 
  cleanup:
     virDomainObjEndAPI(&vm);
-    if (event)
-        virObjectEventStateQueue(privconn->domainEventState, event);
+    virObjectEventStateQueue(privconn->domainEventState, event);
     return ret;
 }
 
@@ -969,8 +966,7 @@ bhyveDomainCreateXML(virConnectPtr conn,
     virObjectUnref(caps);
     virDomainDefFree(def);
     virDomainObjEndAPI(&vm);
-    if (event)
-        virObjectEventStateQueue(privconn->domainEventState, event);
+    virObjectEventStateQueue(privconn->domainEventState, event);
 
     return dom;
 }
@@ -1002,8 +998,7 @@ bhyveDomainDestroy(virDomainPtr dom)
 
  cleanup:
     virDomainObjEndAPI(&vm);
-    if (event)
-        virObjectEventStateQueue(privconn->domainEventState, event);
+    virObjectEventStateQueue(privconn->domainEventState, event);
     return ret;
 }
 
diff --git a/src/conf/object_event.c b/src/conf/object_event.c
index 9a7e7e50c1..826197000b 100644
--- a/src/conf/object_event.c
+++ b/src/conf/object_event.c
@@ -776,6 +776,9 @@ void
 virObjectEventStateQueue(virObjectEventStatePtr state,
                          virObjectEventPtr event)
 {
+   if (!event)
+       return;
+
     virObjectEventStateQueueRemote(state, event, -1);
 }
 
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index a2e29a2121..cfb431488d 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -499,8 +499,7 @@ lxcDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
     virDomainDefFree(def);
     virDomainDefFree(oldDef);
     virDomainObjEndAPI(&vm);
-    if (event)
-        virObjectEventStateQueue(driver->domainEventState, event);
+    virObjectEventStateQueue(driver->domainEventState, event);
     virObjectUnref(caps);
     virObjectUnref(cfg);
     return dom;
@@ -553,8 +552,7 @@ static int lxcDomainUndefineFlags(virDomainPtr dom,
 
  cleanup:
     virDomainObjEndAPI(&vm);
-    if (event)
-        virObjectEventStateQueue(driver->domainEventState, event);
+    virObjectEventStateQueue(driver->domainEventState, event);
     virObjectUnref(cfg);
     return ret;
 }
@@ -1132,8 +1130,7 @@ static int lxcDomainCreateWithFiles(virDomainPtr dom,
 
  cleanup:
     virDomainObjEndAPI(&vm);
-    if (event)
-        virObjectEventStateQueue(driver->domainEventState, event);
+    virObjectEventStateQueue(driver->domainEventState, event);
     virObjectUnref(cfg);
     virNWFilterUnlockFilterUpdates();
     return ret;
@@ -1260,8 +1257,7 @@ lxcDomainCreateXMLWithFiles(virConnectPtr conn,
  cleanup:
     virDomainDefFree(def);
     virDomainObjEndAPI(&vm);
-    if (event)
-        virObjectEventStateQueue(driver->domainEventState, event);
+    virObjectEventStateQueue(driver->domainEventState, event);
     virObjectUnref(caps);
     virObjectUnref(cfg);
     virNWFilterUnlockFilterUpdates();
@@ -1516,8 +1512,7 @@ lxcDomainDestroyFlags(virDomainPtr dom,
 
  cleanup:
     virDomainObjEndAPI(&vm);
-    if (event)
-        virObjectEventStateQueue(driver->domainEventState, event);
+    virObjectEventStateQueue(driver->domainEventState, event);
     return ret;
 }
 
@@ -1709,8 +1704,7 @@ static void lxcNotifyLoadDomain(virDomainObjPtr vm, int newVM, void *opaque)
             virDomainEventLifecycleNewFromObj(vm,
                                      VIR_DOMAIN_EVENT_DEFINED,
                                      VIR_DOMAIN_EVENT_DEFINED_ADDED);
-        if (event)
-            virObjectEventStateQueue(driver->domainEventState, event);
+        virObjectEventStateQueue(driver->domainEventState, event);
     }
 }
 
@@ -3100,8 +3094,7 @@ static int lxcDomainSuspend(virDomainPtr dom)
     virLXCDomainObjEndJob(driver, vm);
 
  cleanup:
-    if (event)
-        virObjectEventStateQueue(driver->domainEventState, event);
+    virObjectEventStateQueue(driver->domainEventState, event);
     virDomainObjEndAPI(&vm);
     virObjectUnref(cfg);
     return ret;
@@ -3158,8 +3151,7 @@ static int lxcDomainResume(virDomainPtr dom)
     virLXCDomainObjEndJob(driver, vm);
 
  cleanup:
-    if (event)
-        virObjectEventStateQueue(driver->domainEventState, event);
+    virObjectEventStateQueue(driver->domainEventState, event);
     virDomainObjEndAPI(&vm);
     virObjectUnref(cfg);
     return ret;
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index cc6ed12526..60ae7daaed 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -82,8 +82,7 @@ lxcProcessAutoDestroy(virDomainObjPtr dom,
     if (!dom->persistent)
         virDomainObjListRemove(driver->domains, dom);
 
-    if (event)
-        virObjectEventStateQueue(driver->domainEventState, event);
+    virObjectEventStateQueue(driver->domainEventState, event);
 }
 
 /*
@@ -692,8 +691,7 @@ static void virLXCProcessMonitorEOFNotify(virLXCMonitorPtr mon,
      * before adding monitorCallbacks. Since we are now done with the @vm
      * we can Unref/Unlock */
     virDomainObjEndAPI(&vm);
-    if (event)
-        virObjectEventStateQueue(driver->domainEventState, event);
+    virObjectEventStateQueue(driver->domainEventState, event);
 }
 
 static void virLXCProcessMonitorExitNotify(virLXCMonitorPtr mon ATTRIBUTE_UNUSED,
@@ -1607,8 +1605,7 @@ virLXCProcessAutostartDomain(virDomainObjPtr vm,
                 virDomainEventLifecycleNewFromObj(vm,
                                          VIR_DOMAIN_EVENT_STARTED,
                                          VIR_DOMAIN_EVENT_STARTED_BOOTED);
-            if (event)
-                virObjectEventStateQueue(data->driver->domainEventState, event);
+            virObjectEventStateQueue(data->driver->domainEventState, event);
         }
     }
     virObjectUnlock(vm);
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 4b33e12b30..ac849581ec 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -3579,8 +3579,7 @@ networkCreateXML(virConnectPtr conn,
 
  cleanup:
     virNetworkDefFree(newDef);
-    if (event)
-        virObjectEventStateQueue(driver->networkEventState, event);
+    virObjectEventStateQueue(driver->networkEventState, event);
     virNetworkObjEndAPI(&obj);
     return net;
 }
@@ -3633,8 +3632,7 @@ networkDefineXML(virConnectPtr conn,
     net = virGetNetwork(conn, def->name, def->uuid);
 
  cleanup:
-    if (event)
-        virObjectEventStateQueue(driver->networkEventState, event);
+    virObjectEventStateQueue(driver->networkEventState, event);
     if (freeDef)
         virNetworkDefFree(def);
     virNetworkObjEndAPI(&obj);
@@ -3694,8 +3692,7 @@ networkUndefine(virNetworkPtr net)
     ret = 0;
 
  cleanup:
-    if (event)
-        virObjectEventStateQueue(driver->networkEventState, event);
+    virObjectEventStateQueue(driver->networkEventState, event);
     virNetworkObjEndAPI(&obj);
     return ret;
 }
@@ -3905,8 +3902,7 @@ networkCreate(virNetworkPtr net)
                                         0);
 
  cleanup:
-    if (event)
-        virObjectEventStateQueue(driver->networkEventState, event);
+    virObjectEventStateQueue(driver->networkEventState, event);
     virNetworkObjEndAPI(&obj);
     return ret;
 }
@@ -3952,8 +3948,7 @@ networkDestroy(virNetworkPtr net)
     }
 
  cleanup:
-    if (event)
-        virObjectEventStateQueue(driver->networkEventState, event);
+    virObjectEventStateQueue(driver->networkEventState, event);
     virNetworkObjEndAPI(&obj);
     return ret;
 }
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index d34ec30379..22897591de 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1297,8 +1297,7 @@ udevRemoveOneDevice(struct udev_device *device)
     virNodeDeviceObjListRemove(driver->devs, obj);
     virObjectUnref(obj);
 
-    if (event)
-        virObjectEventStateQueue(driver->nodeDeviceEventState, event);
+    virObjectEventStateQueue(driver->nodeDeviceEventState, event);
     return 0;
 }
 
@@ -1410,8 +1409,7 @@ udevAddOneDevice(struct udev_device *device)
     ret = 0;
 
  cleanup:
-    if (event)
-        virObjectEventStateQueue(driver->nodeDeviceEventState, event);
+    virObjectEventStateQueue(driver->nodeDeviceEventState, event);
 
     if (ret != 0) {
         VIR_DEBUG("Discarding device %d %p %s", ret, def,
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 11c261db1a..3d4e96c6bd 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -259,8 +259,7 @@ qemuDomainDisableNamespace(virDomainObjPtr vm,
 void qemuDomainEventQueue(virQEMUDriverPtr driver,
                           virObjectEventPtr event)
 {
-    if (event)
-        virObjectEventStateQueue(driver->domainEventState, event);
+    virObjectEventStateQueue(driver->domainEventState, event);
 }
 
 
diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c
index 02fcaece35..3c3557947e 100644
--- a/src/secret/secret_driver.c
+++ b/src/secret/secret_driver.c
@@ -278,8 +278,7 @@ secretDefineXML(virConnectPtr conn,
  cleanup:
     virSecretDefFree(def);
     virSecretObjEndAPI(&obj);
-    if (event)
-        virObjectEventStateQueue(driver->secretEventState, event);
+    virObjectEventStateQueue(driver->secretEventState, event);
 
     return ret;
 }
@@ -341,8 +340,7 @@ secretSetValue(virSecretPtr secret,
 
  cleanup:
     virSecretObjEndAPI(&obj);
-    if (event)
-        virObjectEventStateQueue(driver->secretEventState, event);
+    virObjectEventStateQueue(driver->secretEventState, event);
 
     return ret;
 }
@@ -420,8 +418,7 @@ secretUndefine(virSecretPtr secret)
 
  cleanup:
     virSecretObjEndAPI(&obj);
-    if (event)
-        virObjectEventStateQueue(driver->secretEventState, event);
+    virObjectEventStateQueue(driver->secretEventState, event);
 
     return ret;
 }
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index b125e2caf9..254818e308 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -772,8 +772,7 @@ storagePoolCreateXML(virConnectPtr conn,
  cleanup:
     VIR_FREE(stateFile);
     virStoragePoolDefFree(newDef);
-    if (event)
-        virObjectEventStateQueue(driver->storageEventState, event);
+    virObjectEventStateQueue(driver->storageEventState, event);
     virStoragePoolObjEndAPI(&obj);
     return pool;
 }
@@ -829,8 +828,7 @@ storagePoolDefineXML(virConnectPtr conn,
     pool = virGetStoragePool(conn, def->name, def->uuid, NULL, NULL);
 
  cleanup:
-    if (event)
-        virObjectEventStateQueue(driver->storageEventState, event);
+    virObjectEventStateQueue(driver->storageEventState, event);
     virStoragePoolDefFree(newDef);
     virStoragePoolObjEndAPI(&obj);
     return pool;
@@ -889,8 +887,7 @@ storagePoolUndefine(virStoragePoolPtr pool)
     ret = 0;
 
  cleanup:
-    if (event)
-        virObjectEventStateQueue(driver->storageEventState, event);
+    virObjectEventStateQueue(driver->storageEventState, event);
     virStoragePoolObjEndAPI(&obj);
     return ret;
 }
@@ -971,8 +968,7 @@ storagePoolCreate(virStoragePoolPtr pool,
 
  cleanup:
     VIR_FREE(stateFile);
-    if (event)
-        virObjectEventStateQueue(driver->storageEventState, event);
+    virObjectEventStateQueue(driver->storageEventState, event);
     virStoragePoolObjEndAPI(&obj);
     return ret;
 }
@@ -1016,8 +1012,7 @@ storagePoolBuild(virStoragePoolPtr pool,
     ret = 0;
 
  cleanup:
-    if (event)
-        virObjectEventStateQueue(driver->storageEventState, event);
+    virObjectEventStateQueue(driver->storageEventState, event);
     virStoragePoolObjEndAPI(&obj);
     return ret;
 }
@@ -1082,8 +1077,7 @@ storagePoolDestroy(virStoragePoolPtr pool)
     ret = 0;
 
  cleanup:
-    if (event)
-        virObjectEventStateQueue(driver->storageEventState, event);
+    virObjectEventStateQueue(driver->storageEventState, event);
     virStoragePoolObjEndAPI(&obj);
     return ret;
 }
@@ -1147,8 +1141,7 @@ storagePoolDelete(virStoragePoolPtr pool,
     ret = 0;
 
  cleanup:
-    if (event)
-        virObjectEventStateQueue(driver->storageEventState, event);
+    virObjectEventStateQueue(driver->storageEventState, event);
     virStoragePoolObjEndAPI(&obj);
     return ret;
 }
@@ -1210,8 +1203,7 @@ storagePoolRefresh(virStoragePoolPtr pool,
     ret = 0;
 
  cleanup:
-    if (event)
-        virObjectEventStateQueue(driver->storageEventState, event);
+    virObjectEventStateQueue(driver->storageEventState, event);
     virStoragePoolObjEndAPI(&obj);
     return ret;
 }
@@ -2301,8 +2293,7 @@ virStorageVolPoolRefreshThread(void *opaque)
     event = virStoragePoolEventRefreshNew(def->name, def->uuid);
 
  cleanup:
-    if (event)
-        virObjectEventStateQueue(driver->storageEventState, event);
+    virObjectEventStateQueue(driver->storageEventState, event);
     virStoragePoolObjEndAPI(&obj);
     virStorageVolPoolRefreshDataFree(cbdata);
 }
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 89121d4220..eb4e5aa341 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -177,9 +177,6 @@ static void testDriverUnlock(testDriverPtr driver)
 static void testObjectEventQueue(testDriverPtr driver,
                                  virObjectEventPtr event)
 {
-    if (!event)
-        return;
-
     virObjectEventStateQueue(driver->eventState, event);
 }
 
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index cb82b9d582..c6443d958e 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -2093,8 +2093,7 @@ prlsdkSendEvent(vzDriverPtr driver,
     event = virDomainEventLifecycleNewFromObj(dom,
                                               lvEventType,
                                               lvEventTypeDetails);
-    if (event)
-        virObjectEventStateQueue(driver->domainEventState, event);
+    virObjectEventStateQueue(driver->domainEventState, event);
 }
 
 static void
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH libvirt 2/3] events: move NULL check to EventStateQueueRemote
Posted by Anya Harter, 1 week ago
Remove NULL check from virObjectEventStateQueue and add NULL check to virObjectEventStateQueueRemote

Remove NULL check around call to virObjectEventStateQueueRemote in
remote_driver.c

Signed-off-by: Anya Harter <aharter@redhat.com>
---
 src/conf/object_event.c    | 6 +++---
 src/remote/remote_driver.c | 3 +--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/conf/object_event.c b/src/conf/object_event.c
index 826197000b..dd5c6ff32d 100644
--- a/src/conf/object_event.c
+++ b/src/conf/object_event.c
@@ -744,6 +744,9 @@ virObjectEventStateQueueRemote(virObjectEventStatePtr state,
                                virObjectEventPtr event,
                                int remoteID)
 {
+    if (!event)
+        return;
+
     if (state->timer < 0) {
         virObjectUnref(event);
         return;
@@ -776,9 +779,6 @@ void
 virObjectEventStateQueue(virObjectEventStatePtr state,
                          virObjectEventPtr event)
 {
-   if (!event)
-       return;
-
     virObjectEventStateQueueRemote(state, event, -1);
 }
 
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index c22993ce9e..fbec5c727b 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -4435,8 +4435,7 @@ static void
 remoteEventQueue(struct private_data *priv, virObjectEventPtr event,
                  int remoteID)
 {
-    if (event)
-        virObjectEventStateQueueRemote(priv->eventState, event, remoteID);
+    virObjectEventStateQueueRemote(priv->eventState, event, remoteID);
 }
 
 
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH libvirt 3/3] events: remove remoteEventQueue wrapper function
Posted by Anya Harter, 1 week ago
>From remote_driver.c

And replace all calls with virObjectEventStateQueue such that:

    remoteEventQueue(priv, event, callbackID);

becomes:

    virObjectEventStateQueue(priv->eventState, event, callbackID);

Signed-off-by: Anya Harter <aharter@redhat.com>
---
 src/remote/remote_driver.c | 74 +++++++++++++++++---------------------
 1 file changed, 33 insertions(+), 41 deletions(-)

diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index fbec5c727b..c36941c27e 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -4431,14 +4431,6 @@ remoteConnectDomainEventDeregister(virConnectPtr conn,
 }
 
 
-static void
-remoteEventQueue(struct private_data *priv, virObjectEventPtr event,
-                 int remoteID)
-{
-    virObjectEventStateQueueRemote(priv->eventState, event, remoteID);
-}
-
-
 static void
 remoteDomainBuildEventLifecycleHelper(virConnectPtr conn,
                                       remote_domain_event_lifecycle_msg *msg,
@@ -4455,7 +4447,7 @@ remoteDomainBuildEventLifecycleHelper(virConnectPtr conn,
     event = virDomainEventLifecycleNewFromDom(dom, msg->event, msg->detail);
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
 }
 static void
 remoteDomainBuildEventLifecycle(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
@@ -4493,7 +4485,7 @@ remoteDomainBuildEventRebootHelper(virConnectPtr conn,
     event = virDomainEventRebootNewFromDom(dom);
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
 }
 static void
 remoteDomainBuildEventReboot(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
@@ -4530,7 +4522,7 @@ remoteDomainBuildEventRTCChangeHelper(virConnectPtr conn,
     event = virDomainEventRTCChangeNewFromDom(dom, msg->offset);
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
 }
 static void
 remoteDomainBuildEventRTCChange(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
@@ -4567,7 +4559,7 @@ remoteDomainBuildEventWatchdogHelper(virConnectPtr conn,
     event = virDomainEventWatchdogNewFromDom(dom, msg->action);
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
 }
 static void
 remoteDomainBuildEventWatchdog(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
@@ -4607,7 +4599,7 @@ remoteDomainBuildEventIOErrorHelper(virConnectPtr conn,
                                             msg->action);
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
 }
 static void
 remoteDomainBuildEventIOError(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
@@ -4649,7 +4641,7 @@ remoteDomainBuildEventIOErrorReasonHelper(virConnectPtr conn,
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
 }
 static void
 remoteDomainBuildEventIOErrorReason(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
@@ -4688,7 +4680,7 @@ remoteDomainBuildEventBlockJobHelper(virConnectPtr conn,
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
 }
 static void
 remoteDomainBuildEventBlockJob(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
@@ -4728,7 +4720,7 @@ remoteDomainBuildEventBlockJob2(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, msg->callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
 }
 
 static void
@@ -4782,7 +4774,7 @@ remoteDomainBuildEventGraphicsHelper(virConnectPtr conn,
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
     return;
 
  error:
@@ -4843,7 +4835,7 @@ remoteDomainBuildEventControlErrorHelper(virConnectPtr conn,
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
 }
 static void
 remoteDomainBuildEventControlError(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
@@ -4886,7 +4878,7 @@ remoteDomainBuildEventDiskChangeHelper(virConnectPtr conn,
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
 }
 static void
 remoteDomainBuildEventDiskChange(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
@@ -4927,7 +4919,7 @@ remoteDomainBuildEventTrayChangeHelper(virConnectPtr conn,
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
 }
 static void
 remoteDomainBuildEventTrayChange(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
@@ -4966,7 +4958,7 @@ remoteDomainBuildEventPMWakeupHelper(virConnectPtr conn,
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
 }
 static void
 remoteDomainBuildEventPMWakeup(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
@@ -5006,7 +4998,7 @@ remoteDomainBuildEventPMSuspendHelper(virConnectPtr conn,
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
 }
 static void
 remoteDomainBuildEventPMSuspend(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
@@ -5045,7 +5037,7 @@ remoteDomainBuildEventBalloonChangeHelper(virConnectPtr conn,
     event = virDomainEventBalloonChangeNewFromDom(dom, msg->actual);
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
 }
 static void
 remoteDomainBuildEventBalloonChange(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
@@ -5085,7 +5077,7 @@ remoteDomainBuildEventPMSuspendDiskHelper(virConnectPtr conn,
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
 }
 static void
 remoteDomainBuildEventPMSuspendDisk(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
@@ -5125,7 +5117,7 @@ remoteDomainBuildEventDeviceRemovedHelper(virConnectPtr conn,
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
 }
 static void
 remoteDomainBuildEventDeviceRemoved(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
@@ -5165,7 +5157,7 @@ remoteDomainBuildEventCallbackDeviceAdded(virNetClientProgramPtr prog ATTRIBUTE_
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, msg->callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
 }
 
 
@@ -5187,7 +5179,7 @@ remoteDomainBuildEventCallbackDeviceRemovalFailed(virNetClientProgramPtr prog AT
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, msg->callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
 }
 
 static void
@@ -5219,7 +5211,7 @@ remoteDomainBuildEventCallbackTunable(virNetClientProgramPtr prog ATTRIBUTE_UNUS
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, msg->callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
 }
 
 
@@ -5242,7 +5234,7 @@ remoteDomainBuildEventCallbackAgentLifecycle(virNetClientProgramPtr prog ATTRIBU
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, msg->callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
 }
 
 
@@ -5265,7 +5257,7 @@ remoteDomainBuildEventCallbackMigrationIteration(virNetClientProgramPtr prog ATT
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, msg->callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
 }
 
 
@@ -5298,7 +5290,7 @@ remoteDomainBuildEventCallbackJobCompleted(virNetClientProgramPtr prog ATTRIBUTE
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, msg->callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
 }
 
 
@@ -5320,7 +5312,7 @@ remoteDomainBuildEventCallbackMetadataChange(virNetClientProgramPtr prog ATTRIBU
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, msg->callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
 }
 
 
@@ -5343,7 +5335,7 @@ remoteNetworkBuildEventLifecycle(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
                                         msg->detail);
     virObjectUnref(net);
 
-    remoteEventQueue(priv, event, msg->callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
 }
 
 static void
@@ -5365,7 +5357,7 @@ remoteStoragePoolBuildEventLifecycle(virNetClientProgramPtr prog ATTRIBUTE_UNUSE
                                             msg->detail);
     virObjectUnref(pool);
 
-    remoteEventQueue(priv, event, msg->callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
 }
 
 static void
@@ -5386,7 +5378,7 @@ remoteStoragePoolBuildEventRefresh(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
     event = virStoragePoolEventRefreshNew(pool->name, pool->uuid);
     virObjectUnref(pool);
 
-    remoteEventQueue(priv, event, msg->callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
 }
 
 static void
@@ -5408,7 +5400,7 @@ remoteNodeDeviceBuildEventLifecycle(virNetClientProgramPtr prog ATTRIBUTE_UNUSED
                                            msg->detail);
     virObjectUnref(dev);
 
-    remoteEventQueue(priv, event, msg->callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
 }
 
 static void
@@ -5429,7 +5421,7 @@ remoteNodeDeviceBuildEventUpdate(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
     event = virNodeDeviceEventUpdateNew(dev->name);
     virObjectUnref(dev);
 
-    remoteEventQueue(priv, event, msg->callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
 }
 
 static void
@@ -5451,7 +5443,7 @@ remoteSecretBuildEventLifecycle(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
                                        msg->event, msg->detail);
     virObjectUnref(secret);
 
-    remoteEventQueue(priv, event, msg->callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
 }
 
 static void
@@ -5472,7 +5464,7 @@ remoteSecretBuildEventValueChanged(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
     event = virSecretEventValueChangedNew(secret->uuid, secret->usageType, secret->usageID);
     virObjectUnref(secret);
 
-    remoteEventQueue(priv, event, msg->callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
 }
 
 static void
@@ -5496,7 +5488,7 @@ remoteDomainBuildQemuMonitorEvent(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
                                          msg->details ? *msg->details : NULL);
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, msg->callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
 }
 
 
@@ -5555,7 +5547,7 @@ remoteDomainBuildEventBlockThreshold(virNetClientProgramPtr prog ATTRIBUTE_UNUSE
 
     virObjectUnref(dom);
 
-    remoteEventQueue(priv, event, msg->callbackID);
+    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
 }
 
 
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH libvirt 3/3] events: remove remoteEventQueue wrapper function
Posted by Anya Harter, 1 week ago

On 06/11/2018 03:38 PM, Anya Harter wrote:
>>From remote_driver.c
> 
> And replace all calls with virObjectEventStateQueue such that:
> 
>     remoteEventQueue(priv, event, callbackID);
> 
> becomes:
> 
>     virObjectEventStateQueue(priv->eventState, event, callbackID);

Just a quick edit...

The last line of the commit message should read:
virObjectEventStateQueueRemote(priv->eventState, event, callbackID);

> 
> Signed-off-by: Anya Harter <aharter@redhat.com>
> ---
>  src/remote/remote_driver.c | 74 +++++++++++++++++---------------------
>  1 file changed, 33 insertions(+), 41 deletions(-)
> 
> diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
> index fbec5c727b..c36941c27e 100644
> --- a/src/remote/remote_driver.c
> +++ b/src/remote/remote_driver.c
> @@ -4431,14 +4431,6 @@ remoteConnectDomainEventDeregister(virConnectPtr conn,
>  }
>  
>  
> -static void
> -remoteEventQueue(struct private_data *priv, virObjectEventPtr event,
> -                 int remoteID)
> -{
> -    virObjectEventStateQueueRemote(priv->eventState, event, remoteID);
> -}
> -
> -
>  static void
>  remoteDomainBuildEventLifecycleHelper(virConnectPtr conn,
>                                        remote_domain_event_lifecycle_msg *msg,
> @@ -4455,7 +4447,7 @@ remoteDomainBuildEventLifecycleHelper(virConnectPtr conn,
>      event = virDomainEventLifecycleNewFromDom(dom, msg->event, msg->detail);
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
>  }
>  static void
>  remoteDomainBuildEventLifecycle(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
> @@ -4493,7 +4485,7 @@ remoteDomainBuildEventRebootHelper(virConnectPtr conn,
>      event = virDomainEventRebootNewFromDom(dom);
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
>  }
>  static void
>  remoteDomainBuildEventReboot(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
> @@ -4530,7 +4522,7 @@ remoteDomainBuildEventRTCChangeHelper(virConnectPtr conn,
>      event = virDomainEventRTCChangeNewFromDom(dom, msg->offset);
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
>  }
>  static void
>  remoteDomainBuildEventRTCChange(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
> @@ -4567,7 +4559,7 @@ remoteDomainBuildEventWatchdogHelper(virConnectPtr conn,
>      event = virDomainEventWatchdogNewFromDom(dom, msg->action);
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
>  }
>  static void
>  remoteDomainBuildEventWatchdog(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
> @@ -4607,7 +4599,7 @@ remoteDomainBuildEventIOErrorHelper(virConnectPtr conn,
>                                              msg->action);
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
>  }
>  static void
>  remoteDomainBuildEventIOError(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
> @@ -4649,7 +4641,7 @@ remoteDomainBuildEventIOErrorReasonHelper(virConnectPtr conn,
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
>  }
>  static void
>  remoteDomainBuildEventIOErrorReason(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
> @@ -4688,7 +4680,7 @@ remoteDomainBuildEventBlockJobHelper(virConnectPtr conn,
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
>  }
>  static void
>  remoteDomainBuildEventBlockJob(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
> @@ -4728,7 +4720,7 @@ remoteDomainBuildEventBlockJob2(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, msg->callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
>  }
>  
>  static void
> @@ -4782,7 +4774,7 @@ remoteDomainBuildEventGraphicsHelper(virConnectPtr conn,
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
>      return;
>  
>   error:
> @@ -4843,7 +4835,7 @@ remoteDomainBuildEventControlErrorHelper(virConnectPtr conn,
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
>  }
>  static void
>  remoteDomainBuildEventControlError(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
> @@ -4886,7 +4878,7 @@ remoteDomainBuildEventDiskChangeHelper(virConnectPtr conn,
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
>  }
>  static void
>  remoteDomainBuildEventDiskChange(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
> @@ -4927,7 +4919,7 @@ remoteDomainBuildEventTrayChangeHelper(virConnectPtr conn,
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
>  }
>  static void
>  remoteDomainBuildEventTrayChange(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
> @@ -4966,7 +4958,7 @@ remoteDomainBuildEventPMWakeupHelper(virConnectPtr conn,
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
>  }
>  static void
>  remoteDomainBuildEventPMWakeup(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
> @@ -5006,7 +4998,7 @@ remoteDomainBuildEventPMSuspendHelper(virConnectPtr conn,
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
>  }
>  static void
>  remoteDomainBuildEventPMSuspend(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
> @@ -5045,7 +5037,7 @@ remoteDomainBuildEventBalloonChangeHelper(virConnectPtr conn,
>      event = virDomainEventBalloonChangeNewFromDom(dom, msg->actual);
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
>  }
>  static void
>  remoteDomainBuildEventBalloonChange(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
> @@ -5085,7 +5077,7 @@ remoteDomainBuildEventPMSuspendDiskHelper(virConnectPtr conn,
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
>  }
>  static void
>  remoteDomainBuildEventPMSuspendDisk(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
> @@ -5125,7 +5117,7 @@ remoteDomainBuildEventDeviceRemovedHelper(virConnectPtr conn,
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, callbackID);
>  }
>  static void
>  remoteDomainBuildEventDeviceRemoved(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
> @@ -5165,7 +5157,7 @@ remoteDomainBuildEventCallbackDeviceAdded(virNetClientProgramPtr prog ATTRIBUTE_
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, msg->callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
>  }
>  
>  
> @@ -5187,7 +5179,7 @@ remoteDomainBuildEventCallbackDeviceRemovalFailed(virNetClientProgramPtr prog AT
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, msg->callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
>  }
>  
>  static void
> @@ -5219,7 +5211,7 @@ remoteDomainBuildEventCallbackTunable(virNetClientProgramPtr prog ATTRIBUTE_UNUS
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, msg->callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
>  }
>  
>  
> @@ -5242,7 +5234,7 @@ remoteDomainBuildEventCallbackAgentLifecycle(virNetClientProgramPtr prog ATTRIBU
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, msg->callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
>  }
>  
>  
> @@ -5265,7 +5257,7 @@ remoteDomainBuildEventCallbackMigrationIteration(virNetClientProgramPtr prog ATT
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, msg->callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
>  }
>  
>  
> @@ -5298,7 +5290,7 @@ remoteDomainBuildEventCallbackJobCompleted(virNetClientProgramPtr prog ATTRIBUTE
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, msg->callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
>  }
>  
>  
> @@ -5320,7 +5312,7 @@ remoteDomainBuildEventCallbackMetadataChange(virNetClientProgramPtr prog ATTRIBU
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, msg->callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
>  }
>  
>  
> @@ -5343,7 +5335,7 @@ remoteNetworkBuildEventLifecycle(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
>                                          msg->detail);
>      virObjectUnref(net);
>  
> -    remoteEventQueue(priv, event, msg->callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
>  }
>  
>  static void
> @@ -5365,7 +5357,7 @@ remoteStoragePoolBuildEventLifecycle(virNetClientProgramPtr prog ATTRIBUTE_UNUSE
>                                              msg->detail);
>      virObjectUnref(pool);
>  
> -    remoteEventQueue(priv, event, msg->callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
>  }
>  
>  static void
> @@ -5386,7 +5378,7 @@ remoteStoragePoolBuildEventRefresh(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
>      event = virStoragePoolEventRefreshNew(pool->name, pool->uuid);
>      virObjectUnref(pool);
>  
> -    remoteEventQueue(priv, event, msg->callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
>  }
>  
>  static void
> @@ -5408,7 +5400,7 @@ remoteNodeDeviceBuildEventLifecycle(virNetClientProgramPtr prog ATTRIBUTE_UNUSED
>                                             msg->detail);
>      virObjectUnref(dev);
>  
> -    remoteEventQueue(priv, event, msg->callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
>  }
>  
>  static void
> @@ -5429,7 +5421,7 @@ remoteNodeDeviceBuildEventUpdate(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
>      event = virNodeDeviceEventUpdateNew(dev->name);
>      virObjectUnref(dev);
>  
> -    remoteEventQueue(priv, event, msg->callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
>  }
>  
>  static void
> @@ -5451,7 +5443,7 @@ remoteSecretBuildEventLifecycle(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
>                                         msg->event, msg->detail);
>      virObjectUnref(secret);
>  
> -    remoteEventQueue(priv, event, msg->callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
>  }
>  
>  static void
> @@ -5472,7 +5464,7 @@ remoteSecretBuildEventValueChanged(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
>      event = virSecretEventValueChangedNew(secret->uuid, secret->usageType, secret->usageID);
>      virObjectUnref(secret);
>  
> -    remoteEventQueue(priv, event, msg->callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
>  }
>  
>  static void
> @@ -5496,7 +5488,7 @@ remoteDomainBuildQemuMonitorEvent(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
>                                           msg->details ? *msg->details : NULL);
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, msg->callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
>  }
>  
>  
> @@ -5555,7 +5547,7 @@ remoteDomainBuildEventBlockThreshold(virNetClientProgramPtr prog ATTRIBUTE_UNUSE
>  
>      virObjectUnref(dom);
>  
> -    remoteEventQueue(priv, event, msg->callbackID);
> +    virObjectEventStateQueueRemote(priv->eventState, event, msg->callbackID);
>  }
>  
>  
> 

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