Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 1d34bd5ae937157c68c1d2a605bb0b67 > files > 28

libvirt-0.6.3-20.1.el5_4.src.rpm

diff -rup libvirt-0.6.3.orig/src/remote_internal.c libvirt-0.6.3.new/src/remote_internal.c
--- libvirt-0.6.3.orig/src/remote_internal.c	2009-06-09 06:44:15.000000000 -0400
+++ libvirt-0.6.3.new/src/remote_internal.c	2009-06-09 06:49:08.000000000 -0400
@@ -340,8 +340,10 @@ doRemoteOpen (virConnectPtr conn,
             return VIR_DRV_OPEN_DECLINED;
 
         transport_str = get_transport_from_scheme (conn->uri->scheme);
+    }
 
-        if (!transport_str || STRCASEEQ (transport_str, "tls"))
+    if (transport_str) {
+        if (STRCASEEQ (transport_str, "tls"))
             transport = trans_tls;
         else if (STRCASEEQ (transport_str, "unix"))
             transport = trans_unix;
@@ -357,12 +359,12 @@ doRemoteOpen (virConnectPtr conn,
                      "(should be tls|unix|ssh|ext|tcp)"));
             return VIR_DRV_OPEN_ERROR;
         }
-    }
-
-    if (!transport_str) {
+    } else {
         if ((!conn->uri || !conn->uri->server) &&
             (flags & VIR_DRV_OPEN_REMOTE_UNIX))
             transport = trans_unix;
+        else if (conn->uri)
+            transport = trans_tls;
         else
             return VIR_DRV_OPEN_DECLINED; /* Decline - not a remote URL. */
     }
diff -rup libvirt-0.6.3.orig/src/virsh.c libvirt-0.6.3.new/src/virsh.c
--- libvirt-0.6.3.orig/src/virsh.c	2009-06-09 06:44:15.000000000 -0400
+++ libvirt-0.6.3.new/src/virsh.c	2009-06-09 06:45:28.000000000 -0400
@@ -6979,6 +6979,7 @@ vshInit(vshControl *ctl)
      * such as "help".
      */
     if (!ctl->conn) {
+        virshReportError(ctl);
         vshError(ctl, FALSE, "%s", _("failed to connect to the hypervisor"));
         return FALSE;
     }