From eee457ca40124dc210b19b96d31fadb50891d7d0 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Mon, 8 Jun 2009 15:14:08 +0000 Subject: [PATCH] - SFTP: Increase timeout (#504339) --- gvfs-1.2.3-sftp-40sec-timeout.patch | 30 +++++++++++++++++++++++++++++ gvfs.spec | 8 +++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 gvfs-1.2.3-sftp-40sec-timeout.patch diff --git a/gvfs-1.2.3-sftp-40sec-timeout.patch b/gvfs-1.2.3-sftp-40sec-timeout.patch new file mode 100644 index 0000000..5d9248b --- /dev/null +++ b/gvfs-1.2.3-sftp-40sec-timeout.patch @@ -0,0 +1,30 @@ +diff -up gvfs-1.2.3/daemon/gvfsbackendsftp.c.orig gvfs-1.2.3/daemon/gvfsbackendsftp.c +--- gvfs-1.2.3/daemon/gvfsbackendsftp.c.orig 2009-04-20 12:41:37.000000000 +0200 ++++ gvfs-1.2.3/daemon/gvfsbackendsftp.c 2009-06-08 16:22:08.000000000 +0200 +@@ -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, in + 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); diff --git a/gvfs.spec b/gvfs.spec index ccfea06..8eb03c8 100644 --- a/gvfs.spec +++ b/gvfs.spec @@ -1,7 +1,7 @@ Summary: Backends for the gio framework in GLib Name: gvfs Version: 1.2.3 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ Group: System Environment/Libraries URL: http://www.gtk.org @@ -40,6 +40,8 @@ Patch2: gvfs-1.1.7-gdu-computer-expose-devices.patch Patch7: gvfs-1.2.3-cdda-allow-query-well-formed-filenames-only.patch # https://bugzilla.redhat.com/show_bug.cgi?id=497631 Patch8: gvfs-1.2.2-dnssd-deadlock.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=504339 +Patch9: gvfs-1.2.3-sftp-40sec-timeout.patch # Gdu volume monitor patches, from http://cgit.freedesktop.org/~david/gvfs/log/?h=gdu-volume-monitor # @@ -161,6 +163,7 @@ media players (Media Transfer Protocol) to applications using gvfs. %patch2 -p1 -b .computer-expose-devices %patch7 -p1 -b .cdda-query %patch8 -p1 -b .dnssd-deadlock +%patch9 -p1 -b .sftp-timeout %patch101 -p1 -b .gdu-volume-monitor %patch102 -p1 -b .gdu-volumes-typo @@ -320,6 +323,9 @@ update-desktop-database &> /dev/null ||: %changelog +* Mon Jun 8 2009 Tomas Bzatek - 1.2.3-2 +- SFTP: Increase timeout (#504339) + * Mon May 18 2009 Tomas Bzatek - 1.2.3-1 - Update to 1.2.3 - Prevent deadlocks in dnssd resolver (#497631)