[libvirt] [PATCH 6/9] Change the way client event loop watches are managed

Daniel Veillard veillard at redhat.com
Thu Jul 16 13:19:51 UTC 2009


On Tue, Jul 14, 2009 at 11:19:50AM +0100, Daniel P. Berrange wrote:
> The current qemudRegisterClientEvent() code is used both for
> registering the initial socket watch, and updating the already
> registered watch. This causes unneccessary complexity in alot
> of code which only cares about updating existing watches. The
> updating of a watch cannot ever fail, nor is a reference to the
> 'qemud_server' object required.
> 
> This introduces a new qemudUpdateClientEvent() method for that
> case, allowing the elimination of unneccessary error checking
> and removal of the server back-reference in struct qemud_client.
> 
> * qemud/qemud.h: Remove 'server' field from struct qemud_client.
>   Add qemudUpdateClientEvent() method. Remove 'update' param
>   from qemudRegisterClientEvent method
> * qemud/dispatch.c, qemud/qemud.c, qemud/remote.c: Update alot
>   of code to use qemudUpdateClientEvent() instead of
>   qemudRegisterClientEvent(). Move more logic from remoteRelayDomainEvent
>   into remoteDispatchDomainEventSend.
> 

  Okay, though the explanations are clearer than the patch :-)

   ACK

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list