summaryrefslogtreecommitdiffstats
path: root/security/seahorse/files/patch-ssh_seahorse-ssh-operation.c
blob: 1c7acece06850ee37599c9a51aa02307255d1bd8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- ssh/seahorse-ssh-operation.c.orig   2009-04-12 10:29:33.000000000 -0400
+++ ssh/seahorse-ssh-operation.c    2009-04-19 20:44:50.000000000 -0400
@@ -281,11 +281,14 @@ askpass_handler (GIOChannel *source, GIO
     const gchar *result = NULL;
 
     if (condition & G_IO_IN) {
+        GIOStatus status;
         
         /* Read 1 line from the io channel, including newline character */
-        g_io_channel_read_line (source, &string, &length, NULL, &err);
+        status = g_io_channel_read_line (source, &string, &length, NULL, &err);
 
-        if (err != NULL) {
+        if (status == G_IO_STATUS_EOF) {
+            ret = FALSE;
+        } else if (err != NULL) {
             g_critical ("couldn't read from seahorse-ssh-askpass: %s", err->message);
             g_clear_error (&err);
             ret = FALSE;