On 22.03.2014 08:37, Avanti Ajay wrote:
Hi..
I compiled event-test.c as : gcc event-test.c -o events -lvirt
and then running as : ./events
But I am getting this output and the code terminates without detecting
events :
main:471: Registering domain event cbs
myFreeFunc: Freeing [tray change]
libvir: XML-RPC error : internal error unsupported event ID 10
myFreeFunc: Freeing [pmwakeup]
libvir: XML-RPC error : internal error unsupported event ID 11
myFreeFunc: Freeing [pmsuspend]
libvir: XML-RPC error : internal error unsupported event ID 12
myFreeFunc: Freeing [callback balloonchange]
libvir: XML-RPC error : internal error unsupported event ID 13
main:580: Closing connection
done
I think the problem is you're running an ancient libvirtd which doesn't
understand any of tray change, pmwakeup, pmsuspend, balloonchange
events. And in the way thaat the event-test demo program is written, it
just closes the connection and exits. Try to build the libvirt from the
sources and you should be all good again.
BTW: there's no need to build the event-test.c like that (but you can,
if you want to). You can just:
make -C examples/object-events/ event-test
Michal