summaryrefslogtreecommitdiffstats
path: root/redhat/tdebase/kdebase-3.5.13-fix_kio_sftp.patch
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2013-06-24 19:50:32 +0200
committerFrançois Andriot <albator78@libertysurf.fr>2013-06-24 19:50:32 +0200
commitb4359e8bf97799f83dc1ca62744db7cfcc81bc87 (patch)
tree3346872613490cc467c19e1645d0026c1221bce7 /redhat/tdebase/kdebase-3.5.13-fix_kio_sftp.patch
parent4cc71d79c5718d59078d06c497a56d7c05b41576 (diff)
downloadtde-packaging-b4359e8bf97799f83dc1ca62744db7cfcc81bc87.tar.gz
tde-packaging-b4359e8bf97799f83dc1ca62744db7cfcc81bc87.zip
RPM Packaging: rename directories
Diffstat (limited to 'redhat/tdebase/kdebase-3.5.13-fix_kio_sftp.patch')
-rw-r--r--redhat/tdebase/kdebase-3.5.13-fix_kio_sftp.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/redhat/tdebase/kdebase-3.5.13-fix_kio_sftp.patch b/redhat/tdebase/kdebase-3.5.13-fix_kio_sftp.patch
new file mode 100644
index 000000000..64dfa8e21
--- /dev/null
+++ b/redhat/tdebase/kdebase-3.5.13-fix_kio_sftp.patch
@@ -0,0 +1,57 @@
+commit e72f4926c094b2bd94501518fbcd2a3e66a74f6a
+Author: Timothy Pearson <kb9vqf@pearsoncomputing.net>
+Date: 1335166907 -0500
+
+ Fix sftp failure on newer systems
+ This closes Bug 897
+
+diff --git a/kioslave/sftp/ksshprocess.cpp b/kioslave/sftp/ksshprocess.cpp
+index 2ccab59..3393f89 100644
+--- a/kioslave/sftp/ksshprocess.cpp
++++ b/kioslave/sftp/ksshprocess.cpp
+@@ -569,7 +569,9 @@ TQString KSshProcess::getLine() {
+ // If we still don't have anything in our buffer so there must
+ // not be anything on the pty or stderr. Setup a select()
+ // to wait for some data from SSH.
+- if( buffer.empty() ) {
++ // Hack around select() failure on newer systems
++ unsigned long milliseconds = 0;
++ while ((buffer.size() == 0) && (milliseconds < (60*1000))) {
+ //kdDebug(KSSHPROC) << "KSshProcess::getLine(): " <<
+ // "Line buffer empty, calling select() to wait for data." << endl;
+ int errfd = ssh.stderrFd();
+@@ -616,14 +618,18 @@ TQString KSshProcess::getLine() {
+ // had data on it first.
+ if( FD_ISSET(ptyfd, &rfds) ) {
+ ptyLine = ssh.readLineFromPty(false);
+- buffer.prepend(TQString(ptyLine));
++ if (ptyLine.size() > 0) {
++ buffer.prepend(TQString(ptyLine));
++ }
+ //kdDebug(KSSHPROC) << "KSshProcess::getLine(): "
+ // "line from pty -" << ptyLine << endl;
+ }
+-
++
+ if( FD_ISSET(errfd, &rfds) ) {
+ errLine = ssh.readLineFromStderr(false);
+- buffer.prepend(TQString(errLine));
++ if (errLine.size() > 0) {
++ buffer.prepend(TQString(errLine));
++ }
+ //kdDebug(KSSHPROC) << "KSshProcess::getLine(): "
+ // "line from err -" << errLine << endl;
+ }
+@@ -637,7 +643,11 @@ TQString KSshProcess::getLine() {
+ kdDebug(KSSHPROC) << "KSshProcess::getLine(): "
+ "Exception on std err file descriptor." << endl;
+ }
+-
++
++ if (buffer.size() == 0) {
++ milliseconds++;
++ usleep(1000);
++ }
+ }
+ }
+