events: remove remoteEventQueue wrapper function

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>
This commit is contained in:
Anya Harter 2018-06-11 15:38:19 -04:00 committed by Pavel Hrdina
parent aad3a0b5f8
commit 2cbdf303dd
1 changed files with 33 additions and 41 deletions

View File

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