Displaying 13 results from an estimated 13 matches for "domain_event_handler".
2013 Aug 20
2
virConnectDomainEventRegisterAny problem
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
good day. i trying to make callback function for
VIR_DOMAIN_EVENT_ID_LIFECYCLE, i have successfully registering callback,
but it never called, i need to know when domain started, stopped or
crashed, i have write following code
static int domain_event_handler(virConnectPtr conn, virDomainPtr dom,
int event, int detail, void * opaque)
{
switch(event)
{
}
return 0;
}
.....
int callback =
virConnectDomainEventRegisterAny(libvirt_connection, NULL,
VIR_DOMAIN_EVENT_ID_LIFECYCLE,
VIR_DOMAIN_EVENT_CALLBACK(domain_event_handler), NULL,...
2013 Aug 21
2
Re: virConnectDomainEventRegisterAny problem
...;
>> good day. i trying to make callback function for
>> VIR_DOMAIN_EVENT_ID_LIFECYCLE, i have successfully registering
>> callback, but it never called, i need to know when domain
>> started, stopped or crashed, i have write following code
>>
>> static int domain_event_handler(virConnectPtr conn,
>> virDomainPtr dom, int event, int detail, void * opaque) {
>> switch(event) { } return 0; }
>>
>> ..... int callback =
>> virConnectDomainEventRegisterAny(libvirt_connection, NULL,
>> VIR_DOMAIN_EVENT_ID_LIFECYCLE,
>> VIR_DOMAIN_E...
2013 Aug 21
2
Re: virConnectDomainEventRegisterAny problem
...function for
> >>> VIR_DOMAIN_EVENT_ID_LIFECYCLE, i have successfully registering
> >>> callback, but it never called, i need to know when domain
> >>> started, stopped or crashed, i have write following code
> >>>
> >>> static int domain_event_handler(virConnectPtr conn,
> >>> virDomainPtr dom, int event, int detail, void * opaque) {
> >>> switch(event) { } return 0; }
> >>>
> >>> ..... int callback =
> >>> virConnectDomainEventRegisterAny(libvirt_connection, NULL,
> >>>...
2013 Aug 22
1
Re: virConnectDomainEventRegisterAny problem
..._LIFECYCLE, i have successfully
>>>>>> registering callback, but it never called, i need to
>>>>>> know when domain started, stopped or crashed, i have
>>>>>> write following code
>>>>>>
>>>>>> static int domain_event_handler(virConnectPtr conn,
>>>>>> virDomainPtr dom, int event, int detail, void * opaque) {
>>>>>> switch(event) { } return 0; }
>>>>>>
>>>>>> ..... int callback =
>>>>>> virConnectDomainEventRegisterAny(libvirt_...
2013 Aug 21
0
Re: virConnectDomainEventRegisterAny problem
...M CEST, Alexandr wrote:
>
> good day. i trying to make callback function for
> VIR_DOMAIN_EVENT_ID_LIFECYCLE, i have successfully registering callback,
> but it never called, i need to know when domain started, stopped or
> crashed, i have write following code
>
> static int domain_event_handler(virConnectPtr conn, virDomainPtr dom,
> int event, int detail, void * opaque)
> {
> switch(event)
> {
> }
> return 0;
> }
>
> .....
> int callback =
> virConnectDomainEventRegisterAny(libvirt_connection, NULL,
> VIR_DOMAIN_EVENT_ID_LIFECYC...
2013 Aug 21
0
Re: virConnectDomainEventRegisterAny problem
...i trying to make callback function for
>>> VIR_DOMAIN_EVENT_ID_LIFECYCLE, i have successfully registering
>>> callback, but it never called, i need to know when domain
>>> started, stopped or crashed, i have write following code
>>>
>>> static int domain_event_handler(virConnectPtr conn,
>>> virDomainPtr dom, int event, int detail, void * opaque) {
>>> switch(event) { } return 0; }
>>>
>>> ..... int callback =
>>> virConnectDomainEventRegisterAny(libvirt_connection, NULL,
>>> VIR_DOMAIN_EVENT_ID_LIFECYCL...
2013 Aug 21
0
Re: virConnectDomainEventRegisterAny problem
...; VIR_DOMAIN_EVENT_ID_LIFECYCLE, i have successfully
>>>>> registering callback, but it never called, i need to know
>>>>> when domain started, stopped or crashed, i have write
>>>>> following code
>>>>>
>>>>> static int domain_event_handler(virConnectPtr conn,
>>>>> virDomainPtr dom, int event, int detail, void * opaque) {
>>>>> switch(event) { } return 0; }
>>>>>
>>>>> ..... int callback =
>>>>> virConnectDomainEventRegisterAny(libvirt_connection, NULL,
&g...
2013 Oct 14
2
event handler
...tderr, "Failed to register event implementation: %s\n", err
&& err->message ? err->message: "Unknown error");
return -1;
}
{
int callback = virConnectDomainEventRegisterAny(libvirt_connection,
NULL, VIR_DOMAIN_EVENT_ID_LIFECYCLE,
VIR_DOMAIN_EVENT_CALLBACK(domain_event_handler), NULL, NULL);
if(callback == -1)
{
std::cout<<"Error: failed to register domain event handle
callback\n";
return -1;
}
}
boost::thread(boost::bind(&libvirt_eventloop_thr_func));
...
libvirt_eventloop_thr_func() called, and locked on
virEventRunDefaultImpl(),...
2013 Oct 14
2
Re: event handler
...err->message ? err->message: "Unknown error");
>> return -1;
>> }
>> {
>> int callback =
>> virConnectDomainEventRegisterAny(libvirt_connection, NULL,
>> VIR_DOMAIN_EVENT_ID_LIFECYCLE,
>> VIR_DOMAIN_EVENT_CALLBACK(domain_event_handler), NULL, NULL);
>> if(callback == -1)
>> {
>> std::cout<<"Error: failed to register domain event handle
>> callback\n";
>> return -1;
>> }
>> }
>>
>> boost::thread(boost::bi...
2013 Oct 14
2
Re: event handler
...uot;);
>>>> return -1;
>>>> }
>>>> {
>>>> int callback =
>>>> virConnectDomainEventRegisterAny(libvirt_connection, NULL,
>>>> VIR_DOMAIN_EVENT_ID_LIFECYCLE,
>>>> VIR_DOMAIN_EVENT_CALLBACK(domain_event_handler), NULL, NULL);
>>>> if(callback == -1)
>>>> {
>>>> std::cout<<"Error: failed to register domain event
>>>> handle
>>>> callback\n";
>>>> return -1;
>>>>...
2013 Oct 14
0
Re: event handler
...",
> err && err->message ? err->message: "Unknown error");
> return -1;
> }
> {
> int callback =
> virConnectDomainEventRegisterAny(libvirt_connection, NULL,
> VIR_DOMAIN_EVENT_ID_LIFECYCLE,
> VIR_DOMAIN_EVENT_CALLBACK(domain_event_handler), NULL, NULL);
> if(callback == -1)
> {
> std::cout<<"Error: failed to register domain event handle
> callback\n";
> return -1;
> }
> }
>
> boost::thread(boost::bind(&libvirt_eventloop_thr_func))...
2013 Oct 14
0
Re: event handler
...ssage: "Unknown error");
>>> return -1;
>>> }
>>> {
>>> int callback =
>>> virConnectDomainEventRegisterAny(libvirt_connection, NULL,
>>> VIR_DOMAIN_EVENT_ID_LIFECYCLE,
>>> VIR_DOMAIN_EVENT_CALLBACK(domain_event_handler), NULL, NULL);
>>> if(callback == -1)
>>> {
>>> std::cout<<"Error: failed to register domain event handle
>>> callback\n";
>>> return -1;
>>> }
>>> }
>>>
>&...
2013 Oct 14
0
Re: event handler
...return -1;
>>>>> }
>>>>> {
>>>>> int callback =
>>>>> virConnectDomainEventRegisterAny(libvirt_connection, NULL,
>>>>> VIR_DOMAIN_EVENT_ID_LIFECYCLE,
>>>>> VIR_DOMAIN_EVENT_CALLBACK(domain_event_handler), NULL, NULL);
>>>>> if(callback == -1)
>>>>> {
>>>>> std::cout<<"Error: failed to register domain event handle
>>>>> callback\n";
>>>>> return -1;
>>>>>...