The 'remote_message_header' struct has a mis-leadingly named
field 'direction'. It is really a reflection of the type of
message, and some types can be sent in either direction. Thus
the field is more accurately named 'type'. No function change.
* qemud/remote_protocol.x: Rename 'direction' to 'type' in
'remote_message_header. Write better docs describing the
message header field semantics & usage
* qemud/remote_protocol.c, qemud/remote_protocol.h: Regenerate
* qemud/remote.c, qemud/dispatch.c, src/remote_internal.c
Update to reflect rename of 'direction' to 'type'
The remoteDispatchClientRequest() method is currently hardwired to
assume there is only one type of incoming message, a method call.
To allow for alternate types of incoming messags, the code that is
specific to method calls is being split into a separate method
remoteDispatchClientCall
* qemud/dispatch.c: Move method call specific code out into
remoteDispatchClientCall. Add a helper remoteSerializeError
for returning error messages to client
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.
This removes an assumption from qemudWorker() code that every
incoming message will generate a reply.
* qemud/dispatch.c: remoteDispatchClientRequest now has responsibility
for queuing the reply message to the RPC call
* qemud/qemud.c: Do not queue the RPC call reply in qemudWorker(),
allowing remoteDispatchClientRequest() to take care of it
Introduces an API for encoding the header field for outgoing messages
allowing some duplicated code to be eliminated
* qemud/dispatch.c, qemud/dispatch.h: add remoteEncodeClientMessageHeader
for encoding message header. Update remoteDispatchClientRequest to
use this method.
* qemud/remote.c: Update remoteDispatchDomainEventSend to use the
generic remoteEncodeClientMessageHeader() for encoding event
message hedaders. Push some logic from remoteRelayDomainEvent
down into remoteDispatchDomainEventSend.
Separate the decoding of incoming request header out from the
dispatch code. This will allow later code to making dispatcher
routing decisions based on the header field data.
* qemud/dispatch.c, qemud/dispatch.h: Add remoteDecodeClientMessageHeader
API for decoding the header of a client message. Update the
remoteDispatchClientRequest method to assume a pre-decoded
header.
* qemud/qemud.h: Include a 'remote_message_header' field in
'struct qemud_client_message' for pre-decoded header data
* qemud/qemud.c: Decode the incoming client message header before
invoking remoteDispatchClientRequest
proxy/libvirt_proxy.c qemud/Makefile.am qemud/conf.c qemud/conf.h
qemud/dispatch.c qemud/internal.h qemud/protocol.h
src/driver.h src/internal.h src/libvirt.c src/libvirt_sym.version
src/proxy_internal.c src/proxy_internal.h src/qemu_internal.c
src/test.c src/virsh.c src/virterror.c src/xen_internal.c
src/xen_internal.h src/xend_internal.c src/xm_internal.c
src/xml.h src/xs_internal.c: applied patch from Richard Jones
adding virConnectGetCapabilities(), plus various small little
fixes
* docs/*: fixed the api extractor script and regenerated
Daniel
* qemud/protocol.h: add the (domain/network)(Get/Set)Autostart
requests and replies to the protocol.
* src/qemu_internal.c: hookup the qemu driver autostart
methods
* qemud/dispatch.c, qemud/driver.[ch], internal.h: add
the daemon side, but just set an in-memory autostart
flag for now.
* qemud/driver.[ch], qemud/dispatch.c: fix the fact that
qemudDispatchDomainStart() doesn't report an error if the uuid
lookup fails and also move the uuid lookup into the driver
so that it matches the way we do Destroy().
* qemud/qemud.c, qemud/dispatch.c, qemud/internal.h
qemud/conf.c, qemud/driver.c, configure.in: add a
qemudLog() function which uses syslog() if we're in daemon
mode, doesn't output INFO/DEBUG messages unless the
verbose flag is set and doesn't output DEBUG messages
unless compiled with --enable-debug. Also, make a first
pass through fatal errors and add error messages for them.
* include/libvirt/libvirt.h.in, src/libvirt.c: add
virNetworkGetBridgeName() to allow finding out what
bridge to connect to in order to join a network.
* src/driver.h: add networkGetBridgeName() to vtable.
* qemud/protocol.h: add the request and reply to
the qemud protocol.
* qemud/dispatch.c, qemud/driver.[ch]: handle them
here.
* src/qemu_internal.c: implement GetBridgeName()
in the qemu driver.
* src/libvirt_sym.version: add new symbol.