diff options
author | Tomas Bzatek <tbzatek@redhat.com> | 2009-08-18 16:26:25 +0200 |
---|---|---|
committer | Tomas Bzatek <tbzatek@redhat.com> | 2009-08-18 16:26:25 +0200 |
commit | a86f1a8fb7ecd5a8e3e22d7f95c4f022ba3e7211 (patch) | |
tree | 7c0c12211406801f55a20d3b6ed8b6170e3051a0 /daemon | |
parent | 226a763614fbe3093fcde175ea5d6d569b610eaf (diff) | |
download | gvfs-a86f1a8fb7ecd5a8e3e22d7f95c4f022ba3e7211.tar.gz |
Bump SFTP timeout to 40 seconds
While this is not universal, let's give users more space for their
slow machines (imagine an old 486SX).
Requested in Fedora bug 504339.
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/gvfsbackendsftp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/daemon/gvfsbackendsftp.c b/daemon/gvfsbackendsftp.c index f810b31b..aae1690a 100644 --- a/daemon/gvfsbackendsftp.c +++ b/daemon/gvfsbackendsftp.c @@ -74,6 +74,8 @@ #define USE_PTY 1 #endif +#define SFTP_READ_TIMEOUT 40 /* seconds */ + static GQuark id_q; typedef enum { @@ -598,7 +600,7 @@ wait_for_reply (GVfsBackend *backend, int stdout_fd, GError **error) FD_ZERO (&ifds); FD_SET (stdout_fd, &ifds); - tv.tv_sec = 20; + tv.tv_sec = SFTP_READ_TIMEOUT; tv.tv_usec = 0; ret = select (stdout_fd+1, &ifds, NULL, NULL, &tv); @@ -859,7 +861,7 @@ handle_login (GVfsBackend *backend, FD_SET (stdout_fd, &ifds); FD_SET (prompt_fd, &ifds); - tv.tv_sec = 20; + tv.tv_sec = SFTP_READ_TIMEOUT; tv.tv_usec = 0; ret = select (MAX (stdout_fd, prompt_fd)+1, &ifds, NULL, NULL, &tv); |