Yours.
2012/8/15 Eric Blake <eblake@xxxxxxxxxx>
On 08/14/2012 09:35 AM, mzawdx wang wrote:You'd be better off investigating the source code of libvirt.git (the
> Hi all:
> I am now reading the source codes of libvirt with version 0.9.2 ,
current development is working towards 0.10.0 as the successor to the
released 0.9.13); 0.9.2 is quite old.
In fact, in the meantime, this function was deleted in commit df0b57a95
> and be stuck by the function "qemudDispatchServerEvent". as you can see:
> static void
> qemudDispatchServerEvent(int watch, int fd, int events, void *opaque) {
(0.9.3) as part of using a newer RPC framework under src/rpc.
If you insist on debugging 0.9.2, look at
> ...
> }
>
> My question is : except for the argument "void *opaque", when and how the
> other three arguments (int watch, int fd, int events) being incoming ?
>
> For it is a static function, I look through the source file "libvirt.c" and
> find no answer .
> Could someone give me a help ?
daemon/libvirtd.c:qemudNetworkEnable, which passes the address of
qemudDispatchServerEvent as a callback pointer to virEventAddHandle.
Thus, any time a poll() on the connection socket completes,
qemudDispatchServerEvent() will be called with the information learned
from that poll. In particular,
src/util/event_poll.c:virEventPollDispatchTimeouts() is a location that
calls the callback function.
--
Eric Blake eblake@xxxxxxxxxx +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list