[PATCH] Fix remote virConnectGetMaxVcpus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've been going over the interface to libvirt, trying out every call locally and remotely with all possible combinations of parameters that I can think of. Not surprisingly one or two problems have cropped up. So here's a short series of patches to fix the problems I've found.

virConnectGetMaxVcpus has a second "type" parameter. In practice this isn't used and can be passed as NULL. However that fails in the remote case. The fix is simple enough -- attached.

Rich.

--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
Index: src/remote_internal.c
===================================================================
RCS file: /data/cvs/libvirt/src/remote_internal.c,v
retrieving revision 1.1
diff -u -r1.1 remote_internal.c
--- src/remote_internal.c	11 Jun 2007 11:43:41 -0000	1.1
+++ src/remote_internal.c	21 Jun 2007 14:50:35 -0000
@@ -985,7 +985,7 @@
     GET_PRIVATE (conn, -1);
 
     memset (&ret, 0, sizeof ret);
-    args.type = (char **) &type;
+    args.type = type == NULL ? NULL : (char **) &type;
     if (call (conn, priv, 0, REMOTE_PROC_GET_MAX_VCPUS,
               (xdrproc_t) xdr_remote_get_max_vcpus_args, (char *) &args,
               (xdrproc_t) xdr_remote_get_max_vcpus_ret, (char *) &ret) == -1)

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]