The recent patch tried to fix return values
of this function. However, it resulted in swapped return values,
since if we were previously returning TRUE (1) we are now returning
FALSE (0). Fix this.
---
Please keep me CC'ed as I am not subscribed into the list.

 AUTHORS               |    1 +
 src/virt-viewer-app.c |    6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index a559205..69718a7 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -23,6 +23,7 @@ With additional patches from:
     Yann E. MORIN <[email protected]>
     Yonit Halperin <[email protected]>
     Zeeshan Ali (Khattak) <[email protected]>
+    Michal Privoznik <[email protected]>
 
    ...send patches to get your name here...
 
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index 2275d1c..7e883e9 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -847,17 +847,17 @@ virt_viewer_app_default_activate(VirtViewerApp *self)
 
     if (fd >= 0) {
         if (virt_viewer_session_open_fd(VIRT_VIEWER_SESSION(priv->session), 
fd))
-            return 0;
+            return 1;
     } else if (priv->guri) {
         virt_viewer_app_trace(self, "Opening connection to display at %s\n", 
priv->guri);
         if (virt_viewer_session_open_uri(VIRT_VIEWER_SESSION(priv->session), 
priv->guri))
-            return 0;
+            return 1;
     } else {
         virt_viewer_app_trace(self, "Opening direct TCP connection to display 
at %s:%s:%s\n",
                               priv->ghost, priv->gport, priv->gtlsport ? 
priv->gtlsport : "-1");
         if (virt_viewer_session_open_host(VIRT_VIEWER_SESSION(priv->session),
                                           priv->ghost, priv->gport, 
priv->gtlsport))
-            return 0;
+            return 1;
     }
 
     return -1;
-- 
1.7.8.5

_______________________________________________
virt-tools-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-tools-list

Reply via email to