search for: libvirt_error_handler

Displaying 10 results from an estimated 10 matches for "libvirt_error_handler".

2013 Jul 08
2
Re: deadlock on connection loosing
On 07.07.2013 01:53, Александр wrote: > В письме от Воскресенье, 30-июн-2013 03:41:37 пользователь Александр написал: >> В письме от Вторник, 25-июн-2013 11:47:10 пользователь Michal Privoznik .... > > i have found source of problem, my code looks like this: > > int count = virConnectListAllDomains(connection, NULL, 0); > .... > domain = virDomainDefineXML(connection,
2013 Oct 14
2
event handler
...e) //TODO: stop somehow on exit { if(virEventRunDefaultImpl() < 0) { virErrorPtr err = virGetLastError(); fprintf(stderr, "Failed to run event loop: %s\n", err && err->message ? err->message : "Unknown error"); } } } ... virSetErrorFunc(NULL, libvirt_error_handler); libvirt_connection = virConnectOpen("qemu:///system"); if (virEventRegisterDefaultImpl() < 0) { virErrorPtr err = virGetLastError(); fprintf(stderr, "Failed to register event implementation: %s\n", err && err->message ? err->message: "Unknown erro...
2013 Oct 14
2
Re: event handler
...t;> fprintf(stderr, "Failed to run event loop: %s\n", err && >> err->message ? err->message : "Unknown error"); >> } >> } >> } >> >> >> >> ... >> >> virSetErrorFunc(NULL, libvirt_error_handler); >> libvirt_connection = virConnectOpen("qemu:///system"); > > Move this line ^^^ ... > >> if (virEventRegisterDefaultImpl() < 0) >> { >> virErrorPtr err = virGetLastError(); >> fprintf(stderr, "Failed to regist...
2013 Jul 08
0
Re: deadlock on connection loosing
...shouldn't be able to deadlock > libvirtd at all. Any API call should be deadlock safe (unless called > from a callback). Which reminds me - do you use callbacks? > > Michal yes, i using callbacks for errors, for now just copypasted example callback to print errors static void libvirt_error_handler(void *userdata, virErrorPtr err) { fprintf(stderr, "Failure of libvirt library call:\n"); fprintf(stderr, " Code: %d\n", err->code); fprintf(stderr, " Domain: %d\n", err->domain); fprintf(stderr, " Message: %s\n", err->message); fprintf(stderr,...
2013 Oct 14
2
Re: event handler
...rr && >>>> err->message ? err->message : "Unknown error"); >>>> } >>>> } >>>> } >>>> >>>> >>>> >>>> ... >>>> >>>> virSetErrorFunc(NULL, libvirt_error_handler); >>>> libvirt_connection = virConnectOpen("qemu:///system"); >>> >>> Move this line ^^^ ... >>> >>>> if (virEventRegisterDefaultImpl() < 0) >>>> { >>>> virErrorPtr err = virGetLastError();...
2013 Aug 22
1
Re: virConnectDomainEventRegisterAny problem
...true) //TODO: stop somehow on exit { if(virEventRunDefaultImpl() < 0) { virErrorPtr err = virGetLastError(); fprintf(stderr, "Failed to run event loop: %s\n", err && err->message ? err->message : "Unknown error"); } } } .... virSetErrorFunc(NULL, libvirt_error_handler); libvirt_connection = virConnectOpen("qemu:///system"); if(libvirt_connection == NULL) { std::cout<<"failed to connect to qemu:///system\n"; return -1; } std::cout<<"connected to qemu:///system\n"; if (virEventRegisterDefaultImpl() < 0) {...
2013 Oct 14
0
Re: event handler
...virErrorPtr err = virGetLastError(); > fprintf(stderr, "Failed to run event loop: %s\n", err && > err->message ? err->message : "Unknown error"); > } > } > } > > > > ... > > virSetErrorFunc(NULL, libvirt_error_handler); > libvirt_connection = virConnectOpen("qemu:///system"); Move this line ^^^ ... > if (virEventRegisterDefaultImpl() < 0) > { > virErrorPtr err = virGetLastError(); > fprintf(stderr, "Failed to register event implementation: %s\n"...
2013 Oct 14
0
Re: event handler
...quot;Failed to run event loop: %s\n", err && >>> err->message ? err->message : "Unknown error"); >>> } >>> } >>> } >>> >>> >>> >>> ... >>> >>> virSetErrorFunc(NULL, libvirt_error_handler); >>> libvirt_connection = virConnectOpen("qemu:///system"); >> >> Move this line ^^^ ... >> >>> if (virEventRegisterDefaultImpl() < 0) >>> { >>> virErrorPtr err = virGetLastError(); >>> fprintf(...
2013 Oct 14
0
Re: event handler
...rr->message ? err->message : "Unknown error"); >>>>> } >>>>> } >>>>> } >>>>> >>>>> >>>>> >>>>> ... >>>>> >>>>> virSetErrorFunc(NULL, libvirt_error_handler); >>>>> libvirt_connection = virConnectOpen("qemu:///system"); >>>> >>>> Move this line ^^^ ... >>>> >>>>> if (virEventRegisterDefaultImpl() < 0) >>>>> { >>>>> virErrorPt...
2013 Aug 21
2
Re: virConnectDomainEventRegisterAny problem
On Wed, Aug 21, 2013 at 12:36:06PM +0300, Alexandr wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > 21.08.2013 09:46, Alexandr пишет: > > 21.08.2013 09:32, Martin Kletzander пишет: > >> On Wed 21 Aug 2013 01:03:37 AM CEST, Alexandr wrote: > >>> > >>> good day. i trying to make callback function for > >>>