API: remote support for VIR_TYPED_PARAM_STRING
authorEric Blake <eblake@redhat.com>
Wed, 12 Oct 2011 09:26:34 +0000 (17:26 +0800)
committerEric Blake <eblake@redhat.com>
Sat, 12 Nov 2011 00:25:21 +0000 (17:25 -0700)
commit40624d32fb54920e4aa434fbb2b8999d17e02931
tree890c218e4409ba16d2cbfc380e51030eec358297
parenta218c81da222adce624e661f850ba7052d7f852f
API: remote support for VIR_TYPED_PARAM_STRING

Send and receive string typed parameters across RPC.  This also
completes the back-compat mentioned in the previous patch - the
only time we have an older client talking to a newer server is
if RPC is in use, so filtering out strings during RPC prevents
returning an unknown type to the older client.

* src/remote/remote_protocol.x (remote_typed_param_value): Add
another union value.
* daemon/remote.c (remoteDeserializeTypedParameters): Handle
strings on rpc.
(remoteSerializeTypedParameters): Likewise; plus filter out
strings when replying to older clients.  Adjust callers.
* src/remote/remote_driver.c (remoteFreeTypedParameters)
(remoteSerializeTypedParameters)
(remoteDeserializeTypedParameters): Handle strings on rpc.
* src/rpc/gendispatch.pl: Properly clean up typed arrays.
* src/remote_protocol-structs: Update.
Based on an initial patch by Hu Tao, with feedback from
Daniel P. Berrange.

Signed-off-by: Eric Blake <eblake@redhat.com>
daemon/remote.c
src/remote/remote_driver.c
src/remote/remote_protocol.x
src/remote_protocol-structs
src/rpc/gendispatch.pl