]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
* src/libvir.c: Karel pointed out handle was lost in
authorDaniel Veillard <veillard@redhat.com>
Tue, 24 Jan 2006 13:10:39 +0000 (13:10 +0000)
committerDaniel Veillard <veillard@redhat.com>
Tue, 24 Jan 2006 13:10:39 +0000 (13:10 +0000)
  virConnectOpenReadOnly()
Daniel

ChangeLog
src/libvir.c

index 0b0182b2bcaef58f28c83cc30159b3a14c0cbd3f..0c9016a407d0edfeb16bc3442f41708d72235b38 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jan 24 14:09:37 CET 2006 Daniel Veillard <veillard@redhat.com>
+
+       * src/libvir.c: Karel pointed out handle was lost in
+         virConnectOpenReadOnly()
+
 Mon Jan 23 23:53:07 CET 2006 Daniel Veillard <veillard@redhat.com>
 
        * docs/site.xsl docs/*.png docs/*.html: update the images from Diana,
index e268acc4422478cab509544390bbce2ede7cc42c..23ec2587b2e8e72b4907ab64fdf20ec7d96f15b7 100644 (file)
@@ -147,6 +147,9 @@ virConnectOpenReadOnly(const char *name) {
     handle = xenHypervisorOpen();
     if (handle >= 0)
         method++;
+    else
+        handle = -1;
+
     xshandle = xs_daemon_open_readonly();
     if (xshandle != NULL)
         method++;
@@ -155,7 +158,7 @@ virConnectOpenReadOnly(const char *name) {
     if (ret == NULL)
         goto failed;
     ret->magic = VIR_CONNECT_MAGIC;
-    ret->handle = -1;
+    ret->handle = handle;
     ret->xshandle = xshandle;
     if (xend_setup(ret) == 0)
         method++;