On 12/13/2011 05:38 PM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange(a)redhat.com>
The Xen & VBox drivers deal with callbacks & dispatching of
events directly. All the other drivers use a timer to dispatch
events from a clean stack state, rather than deep inside the
drivers. Convert Xen & VBox over to virDomainEventState so
that they match behaviour of other drivers
@@ -323,17 +326,16 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth,
unsigned int flags)
return VIR_DRV_OPEN_ERROR;
}
- /* Allocate callback list */
- if (VIR_ALLOC(cbList) < 0) {
- virReportOOMError();
+ if (!(priv->domainEvents = virDomainEventStateNew(xenDomainEventFlush,
+ priv,
+ NULL,
+ NULL))) {
This last parameter should be false, not NULL (wonder why the compiler
didn't complain). It all goes away in later patches, but it might as
well be type-correct while it exists.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org