提交 10960f2a 编写于 作者: R Richard W.M. Jones

Thu Jun 21 16:48:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>

	* src/remote_internal.c: Fix virConnectGetMaxVcpus in the
	  remote case when type parameter is NULL.
	* src/xend_internal.c: Proper error reporting in
	  xenDaemonDomainDumpXML function.
上级 67ec3c93
Thu Jun 21 16:48:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/remote_internal.c: Fix virConnectGetMaxVcpus in the
remote case when type parameter is NULL.
* src/xend_internal.c: Proper error reporting in
xenDaemonDomainDumpXML function.
Thu Jun 21 11:35:00 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/remote_interal.c: fix marshalling of 'id' field for
......
......@@ -985,7 +985,7 @@ remoteGetMaxVcpus (virConnectPtr conn, const char *type)
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)
......
......@@ -2398,8 +2398,11 @@ xenDaemonDomainDumpXMLByID(virConnectPtr conn, int domid)
xenUnifiedPrivatePtr priv;
root = sexpr_get(conn, "/xend/domain/%d?detail=1", domid);
if (root == NULL)
if (root == NULL) {
virXendError (conn, VIR_ERR_XEN_CALL,
"xenDaemonDomainDumpXMLByID failed to find this domain");
return (NULL);
}
priv = (xenUnifiedPrivatePtr) conn->privateData;
......@@ -2417,8 +2420,11 @@ xenDaemonDomainDumpXMLByName(virConnectPtr conn, const char *name)
xenUnifiedPrivatePtr priv;
root = sexpr_get(conn, "/xend/domain/%s?detail=1", name);
if (root == NULL)
if (root == NULL) {
virXendError (conn, VIR_ERR_XEN_CALL,
"xenDaemonDomainDumpXMLByName failed to find this domain");
return (NULL);
}
priv = (xenUnifiedPrivatePtr) conn->privateData;
......@@ -2451,8 +2457,12 @@ xenDaemonDomainDumpXML(virDomainPtr domain, int flags ATTRIBUTE_UNUSED)
}
priv = (xenUnifiedPrivatePtr) domain->conn->privateData;
if (domain->id < 0 && priv->xendConfigVersion < 3)
if (domain->id < 0 && priv->xendConfigVersion < 3) {
virXendError (domain->conn, VIR_ERR_XEN_CALL,
"xenDaemonDomainDumpXML domain ID < 0 and xendConfigVersion < 3");
return(NULL);
}
if (domain->id < 0)
return xenDaemonDomainDumpXMLByName(domain->conn, domain->name);
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册