1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-10-26 07:34:04 +03:00

Wed May 2 18:38:00 BST 2007 Richard Jones <rjones@redhat.com>

* src/proxy_internal.c, src/qemu_internal.c, src/test.c,
	  src/xen_unified.c, src/xend_internal.c, src/xs_internal.c:
	  During virConnectOpen, be careful to call __virRaiseError
	  with conn = NULL so that the error message is not
	  discarded.
This commit is contained in:
Richard W.M. Jones
2007-05-02 17:36:25 +00:00
parent f8fa07c107
commit b15d511db4
7 changed files with 46 additions and 24 deletions

View File

@@ -894,7 +894,7 @@ xenDaemonOpen_tcp(virConnectPtr conn, const char *host, int port)
pent = gethostbyname(host);
if (pent == NULL) {
if (inet_aton(host, &ip) == 0) {
virXendError(conn, VIR_ERR_UNKNOWN_HOST, host);
virXendError(NULL, VIR_ERR_UNKNOWN_HOST, host);
errno = ESRCH;
return (-1);
}
@@ -1960,14 +1960,14 @@ xenDaemonOpen(virConnectPtr conn, const char *name,
*/
uri = xmlParseURI(name);
if (uri == NULL) {
virXendError(conn, VIR_ERR_NO_SUPPORT, name);
virXendError(NULL, VIR_ERR_NO_SUPPORT, name);
goto failed;
}
if (uri->scheme == NULL) {
/* It should be a file access */
if (uri->path == NULL) {
virXendError(conn, VIR_ERR_NO_SUPPORT, name);
virXendError(NULL, VIR_ERR_NO_SUPPORT, name);
goto failed;
}
ret = xenDaemonOpen_unix(conn, uri->path);
@@ -1985,7 +1985,7 @@ xenDaemonOpen(virConnectPtr conn, const char *name,
if (ret == -1)
goto failed;
} else {
virXendError(conn, VIR_ERR_NO_SUPPORT, name);
virXendError(NULL, VIR_ERR_NO_SUPPORT, name);
goto failed;
}
}