---
examples/object-events/event-test.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/examples/object-events/event-test.c b/examples/object-events/event-test.c
index 97b3a09..0abcfe4 100644
--- a/examples/object-events/event-test.c
+++ b/examples/object-events/event-test.c
@@ -767,6 +767,18 @@ myDomainEventBlockJobCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
}
+static int
+myDomainEventMigrationIterationCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
+ virDomainPtr dom,
+ int iteration,
+ void *opaque ATTRIBUTE_UNUSED)
+{
+ printf("%s EVENT: Domain %s(%d) migration iteration '%d'\n",
+ __func__, virDomainGetName(dom), virDomainGetID(dom), iteration);
+ return 0;
+}
+
+
static void
myFreeFunc(void *opaque)
{
@@ -816,7 +828,7 @@ struct domainEventData domainEvents[] = {
DOMAIN_EVENT(VIR_DOMAIN_EVENT_ID_TUNABLE, myDomainEventTunableCallback),
DOMAIN_EVENT(VIR_DOMAIN_EVENT_ID_AGENT_LIFECYCLE,
myDomainEventAgentLifecycleCallback),
DOMAIN_EVENT(VIR_DOMAIN_EVENT_ID_DEVICE_ADDED, myDomainEventDeviceAddedCallback),
- /* VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION */
+ DOMAIN_EVENT(VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION,
myDomainEventMigrationIterationCallback),
/* VIR_DOMAIN_EVENT_ID_JOB_COMPLETED */
/* VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED */
};
--
2.8.0