[vinagre] Look for errors in stderr when doing ssh tunneling



commit 6eab1fedde6cbd0cdcd46f3ed1d68515341846b4
Author: Jonh Wendell <jwendell gnome org>
Date:   Wed Jun 16 14:35:19 2010 -0300

    Look for errors in stderr when doing ssh tunneling

 vinagre/vinagre-ssh.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/vinagre/vinagre-ssh.c b/vinagre/vinagre-ssh.c
index 7a5afc8..5ccf1a9 100644
--- a/vinagre/vinagre-ssh.c
+++ b/vinagre/vinagre-ssh.c
@@ -364,6 +364,13 @@ handle_login (GtkWindow *parent,
               ret_val = FALSE;
               break;
             }
+
+          if (len == 0) /* Error, let's exit and look at stderr */
+            {
+              ret_val = TRUE;
+              break;
+            }
+
           buffer[len] = 0;
           if (strncmp (buffer, VINAGRE_SSH_CHECK, VINAGRE_SSH_CHECK_LENGTH) == 0)
             break;
@@ -562,6 +569,7 @@ handle_login (GtkWindow *parent,
   g_object_unref (prompt_stream);
   g_object_unref (stdout_stream);
   g_object_unref (reply_stream);
+
   return ret_val;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]