Merge lp:~ubuntu-branches/ubuntu/maverick/gvfs/maverick-201010010719 into lp:ubuntu/maverick/gvfs

Proposed by James Westby
Status: Merged
Merged at revision: 137
Proposed branch: lp:~ubuntu-branches/ubuntu/maverick/gvfs/maverick-201010010719
Merge into: lp:ubuntu/maverick/gvfs
Diff against target: 140 lines (+85/-13) (has conflicts)
2 files modified
daemon/gvfsbackendsftp.c (+11/-13)
debian/patches/git_backout_sftp_commit_c6be45c.patch (+74/-0)
Conflict adding file debian/patches/git_backout_sftp_commit_c6be45c.patch.  Moved existing file to debian/patches/git_backout_sftp_commit_c6be45c.patch.moved.
To merge this branch: bzr merge lp:~ubuntu-branches/ubuntu/maverick/gvfs/maverick-201010010719

Description of the change

The package history in the archive and the history in the bzr branch differ. As the archive is authoritative the history of lp:ubuntu/maverick/gvfs now reflects that and the old bzr branch has been pushed to lp:~ubuntu-branches/ubuntu/maverick/gvfs/maverick-201010010719. A merge should be performed if necessary.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'daemon/gvfsbackendsftp.c'
2--- daemon/gvfsbackendsftp.c 2010-09-29 17:00:44 +0000
3+++ daemon/gvfsbackendsftp.c 2010-10-01 07:24:49 +0000
4@@ -24,6 +24,7 @@
5 #include <config.h>
6
7 #include <stdlib.h>
8+#include <sys/poll.h>
9 #include <sys/types.h>
10 #include <sys/stat.h>
11 #include <sys/time.h>
12@@ -837,10 +838,9 @@
13 GVfsBackendSftp *op_backend = G_VFS_BACKEND_SFTP (backend);
14 GInputStream *prompt_stream;
15 GOutputStream *reply_stream;
16- fd_set ifds;
17- struct timeval tv;
18 int ret;
19 int prompt_fd;
20+ struct pollfd fds[2];
21 char buffer[1024];
22 gsize len;
23 gboolean aborted = FALSE;
24@@ -864,14 +864,12 @@
25 ret_val = TRUE;
26 while (1)
27 {
28- FD_ZERO (&ifds);
29- FD_SET (stdout_fd, &ifds);
30- FD_SET (prompt_fd, &ifds);
31-
32- tv.tv_sec = SFTP_READ_TIMEOUT;
33- tv.tv_usec = 0;
34-
35- ret = select (MAX (stdout_fd, prompt_fd)+1, &ifds, NULL, NULL, &tv);
36+ fds[0].fd = stdout_fd;
37+ fds[0].events = POLLIN;
38+ fds[1].fd = prompt_fd;
39+ fds[1].events = POLLIN;
40+
41+ ret = poll(fds, 2, SFTP_READ_TIMEOUT);
42
43 if (ret <= 0)
44 {
45@@ -882,11 +880,11 @@
46 break;
47 }
48
49- if (FD_ISSET (stdout_fd, &ifds))
50+ if (fds[0].revents)
51 break; /* Got reply to initial INIT request */
52
53- g_assert (FD_ISSET (prompt_fd, &ifds));
54-
55+ if (!(fds[1].revents & POLLIN))
56+ continue;
57
58 len = g_input_stream_read (prompt_stream,
59 buffer, sizeof (buffer) - 1,
60
61=== added file 'debian/patches/git_backout_sftp_commit_c6be45c.patch'
62--- debian/patches/git_backout_sftp_commit_c6be45c.patch 1970-01-01 00:00:00 +0000
63+++ debian/patches/git_backout_sftp_commit_c6be45c.patch 2010-10-01 07:24:49 +0000
64@@ -0,0 +1,74 @@
65+From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
66+Subject: backout git commit c6be45c; breaking sftp with gvfs on maverick
67+
68+This patch is a direct reversal of the following commit applied on
69+gvfs git, in GVFS version 1.6.4:
70+
71+ From c6be45c89346da80d557cdb01756e6e1975ad1ff Mon Sep 17 00:00:00 2001
72+ From: Tomas Bzatek <tbzatek@redhat.com>
73+ Date: Mon, 27 Sep 2010 14:10:07 +0000
74+ Subject: sftp: Use poll() to cope with openssh-5.6 changes
75+
76+ Patch by Otto Allmendinger
77+ See bug 629184 for details.
78+
79+It appears that this patch without openssh-client 5.6 causes sftp calls
80+to die with connection timeouts.
81+---
82+--- a/daemon/gvfsbackendsftp.c 2010-09-27 15:40:14.000000000 -0400
83++++ b/daemon/gvfsbackendsftp.c 2010-09-27 15:40:21.368456004 -0400
84+@@ -24,7 +24,6 @@
85+ #include <config.h>
86+
87+ #include <stdlib.h>
88+-#include <sys/poll.h>
89+ #include <sys/types.h>
90+ #include <sys/stat.h>
91+ #include <sys/time.h>
92+@@ -838,9 +837,10 @@
93+ GVfsBackendSftp *op_backend = G_VFS_BACKEND_SFTP (backend);
94+ GInputStream *prompt_stream;
95+ GOutputStream *reply_stream;
96++ fd_set ifds;
97++ struct timeval tv;
98+ int ret;
99+ int prompt_fd;
100+- struct pollfd fds[2];
101+ char buffer[1024];
102+ gsize len;
103+ gboolean aborted = FALSE;
104+@@ -864,12 +864,14 @@
105+ ret_val = TRUE;
106+ while (1)
107+ {
108+- fds[0].fd = stdout_fd;
109+- fds[0].events = POLLIN;
110+- fds[1].fd = prompt_fd;
111+- fds[1].events = POLLIN;
112++ FD_ZERO (&ifds);
113++ FD_SET (stdout_fd, &ifds);
114++ FD_SET (prompt_fd, &ifds);
115+
116+- ret = poll(fds, 2, SFTP_READ_TIMEOUT);
117++ tv.tv_sec = SFTP_READ_TIMEOUT;
118++ tv.tv_usec = 0;
119++
120++ ret = select (MAX (stdout_fd, prompt_fd)+1, &ifds, NULL, NULL, &tv);
121+
122+ if (ret <= 0)
123+ {
124+@@ -880,11 +882,11 @@
125+ break;
126+ }
127+
128+- if (fds[0].revents)
129++ if (FD_ISSET (stdout_fd, &ifds))
130+ break; /* Got reply to initial INIT request */
131+
132+- if (!(fds[1].revents & POLLIN))
133+- continue;
134++ g_assert (FD_ISSET (prompt_fd, &ifds));
135++
136+
137+ len = g_input_stream_read (prompt_stream,
138+ buffer, sizeof (buffer) - 1,
139
140=== renamed file 'debian/patches/git_backout_sftp_commit_c6be45c.patch' => 'debian/patches/git_backout_sftp_commit_c6be45c.patch.moved'

Subscribers

People subscribed via source and target branches

to all changes: