On 04/21/2011 10:32 AM, Daniel P. Berrange wrote:
* src/remote/remote_protocol.x: Define wire protocol for migration
protocol v3
* daemon/remote.c: Server side dispatch
* src/remote/remote_driver.c: Client side serialization
* src/remote/remote_protocol.c, src/remote/remote_protocol.h,
daemon/remote_dispatch_args.h, daemon/remote_dispatch_prototypes.h,
daemon/remote_dispatch_ret.h, daemon/remote_dispatch_table.h:
Re-generate files
* src/remote_protocol-structs: Declare new ABIs
---
daemon/remote.c | 315 +++++++++++++++++++++++++++++
daemon/remote_dispatch_args.h | 6 +
daemon/remote_dispatch_prototypes.h | 48 +++++
daemon/remote_dispatch_ret.h | 5 +
daemon/remote_dispatch_table.h | 30 +++
src/remote/remote_driver.c | 371 ++++++++++++++++++++++++++++++++++-
src/remote/remote_protocol.c | 163 +++++++++++++++
src/remote/remote_protocol.h | 140 +++++++++++++
src/remote/remote_protocol.x | 79 ++++++++-
src/remote_protocol-structs | 90 +++++++++
10 files changed, 1240 insertions(+), 7 deletions(-)
Lots of new code, but mostly mechanical. And now that you've got your
first round of remote.c cleanups already committed to the tree,
hopefully some of the worst rebasing is behind us for when you get to
the rest of the RPC series.
/*----------------------------------------------------------------------*/
static struct remote_thread_call *
@@ -11062,6 +11405,22 @@ remoteDomainEventQueueFlush(int timer ATTRIBUTE_UNUSED, void
*opaque)
* but if they do then virterror_internal.has been set.
Odd punctuation...
*/
static virDomainPtr
+get_domain (virConnectPtr conn, remote_domain domain)
+{
+ virDomainPtr dom = NULL;
+ if (domain) {
+ dom = virGetDomain (conn, domain->name, BAD_CAST domain->uuid);
+ if (dom) dom->id = domain->id;
Formatting is a bit inconsistent here [" (" instead of "(" in two
places].
+ }
+ return dom;
+}
+
+/* get_nonnull_domain and get_nonnull_network turn an on-wire
+ * (name, uuid) pair into virDomainPtr or virNetworkPtr object.
+ * These can return NULL if underlying memory allocations fail,
+ * but if they do then virterror_internal.has been set.
...copied here again.
ACK with nits fixed.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org