[gvfs/f14/master] - Fix sftp poll timeout

Tomas Bzatek tbzatek at fedoraproject.org
Mon Oct 4 12:37:57 UTC 2010


commit f4d7d56a53cf03150e3e6d59635526d8eeac931f
Author: Tomas Bzatek <tbzatek at redhat.com>
Date:   Mon Oct 4 14:35:57 2010 +0200

    - Fix sftp poll timeout

 gvfs-1.6.4-gconf-deadlock.patch    |  154 ------------------------------------
 gvfs-1.6.5-sftp-poll-timeout.patch |   30 +++++++
 gvfs.spec                          |   13 +++-
 3 files changed, 42 insertions(+), 155 deletions(-)
---
diff --git a/gvfs-1.6.5-sftp-poll-timeout.patch b/gvfs-1.6.5-sftp-poll-timeout.patch
new file mode 100644
index 0000000..a236dd2
--- /dev/null
+++ b/gvfs-1.6.5-sftp-poll-timeout.patch
@@ -0,0 +1,30 @@
+From 4033907045abcf498686c1b34be7b0160260088d Mon Sep 17 00:00:00 2001
+From: Andreas Henriksson <andreas at fatal.se>
+Date: Sat, 02 Oct 2010 12:51:54 +0000
+Subject: sftp: fix poll() timeout.
+
+When switching from select() to poll() in commit
+"sftp: Use poll() to cope with openssh-5.6 changes" (c6be45c8934)
+the difference in seconds vs milliseconds for select/poll timeout
+argument was missed.
+
+SFTP_READ_TIMEOUT is defined in seconds, so multiply it with 1000
+when using it with poll().
+
+https://bugzilla.gnome.org/show_bug.cgi?id=631169
+---
+diff --git a/daemon/gvfsbackendsftp.c b/daemon/gvfsbackendsftp.c
+index 9fecf6a..f6b7785 100644
+--- a/daemon/gvfsbackendsftp.c
++++ b/daemon/gvfsbackendsftp.c
+@@ -869,7 +869,7 @@ handle_login (GVfsBackend *backend,
+       fds[1].fd = prompt_fd;
+       fds[1].events = POLLIN;
+       
+-      ret = poll(fds, 2, SFTP_READ_TIMEOUT);
++      ret = poll(fds, 2, SFTP_READ_TIMEOUT * 1000);
+       
+       if (ret <= 0)
+         {
+--
+cgit v0.8.3.1
diff --git a/gvfs.spec b/gvfs.spec
index 8f2c70c..067849c 100644
--- a/gvfs.spec
+++ b/gvfs.spec
@@ -1,7 +1,7 @@
 Summary: Backends for the gio framework in GLib
 Name: gvfs
 Version: 1.6.4
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: LGPLv2+
 Group: System Environment/Libraries
 URL: http://www.gtk.org
@@ -40,6 +40,12 @@ Patch0: gvfs-archive-integration.patch
 # https://bugzilla.redhat.com/show_bug.cgi?id=552856
 Patch15: gvfs-1.5.1-gphoto2-no-storageinfo-support.patch
 
+# from upstream
+Patch16: gvfs-1.6.2-stringv-dbus.patch
+
+# from upstream
+Patch17: gvfs-1.6.5-sftp-poll-timeout.patch
+
 Obsoletes: gnome-mount <= 0.8
 Obsoletes: gnome-mount-nautilus-properties <= 0.8
 
@@ -137,6 +143,8 @@ including phones and music players to applications using gvfs.
 %setup -q
 %patch0 -p1 -b .archive-integration
 %patch15 -p1 -b .gphoto2-storageinfo
+%patch16 -p1 -b .stringv-dbus
+%patch17 -p1 -b .sftp-timeout
 
 %build
 
@@ -306,6 +314,9 @@ killall -USR1 gvfsd >&/dev/null || :
 %endif
 
 %changelog
+* Mon Oct  4 2010 Tomas Bzatek <tbzatek at redhat.com> - 1.6.4-2
+- Fix sftp poll timeout
+
 * Wed Sep 29 2010 Matthias Clasen <mclasen at redhat.com> - 1.6.4-1
 - Update to 1.6.4
 


More information about the scm-commits mailing list