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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user