[prev in list] [next in list] [prev in thread] [next in thread]
List: proftpd-committers
Subject: [ProFTPD-committers] proftpd/contrib/mod_sftp scp.c, 1.64.2.8, 1.64.2.9
From: TJ Saunders <castaglia () users ! sourceforge ! net>
Date: 2013-02-27 17:10:56
Message-ID: E1UAkWw-0003Bu-Iq () sfs-ml-1 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Update of /cvsroot/proftp/proftpd/contrib/mod_sftp
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25824/contrib/mod_sftp
Modified Files:
Tag: B1_3_4
scp.c
Log Message:
Backport of fix for Bug#3904 to 1.3.4 branch.
Index: scp.c
===================================================================
RCS file: /cvsroot/proftp/proftpd/contrib/mod_sftp/scp.c,v
retrieving revision 1.64.2.8
retrieving revision 1.64.2.9
diff -u -d -r1.64.2.8 -r1.64.2.9
--- scp.c 3 Jan 2013 21:51:52 -0000 1.64.2.8
+++ scp.c 27 Feb 2013 17:10:54 -0000 1.64.2.9
@@ -1600,7 +1600,7 @@
}
pr_trace_msg(trace_channel, 3, "sending '%s' data (%lu bytes)", sp->path,
- (unsigned long) chunklen);
+ need_confirm ? (unsigned long) (chunklen - 1) : (unsigned long) chunklen);
res = sftp_channel_write_data(p, channel_id, chunk, chunklen);
if (res < 0) {
@@ -2045,8 +2045,16 @@
/* If we've sent all the paths, and we're here, assume that everything
* is OK. We may just have received the final "OK" ACK byte from the
* scp client, and have nothing more to do.
+ *
+ * We would normally return 1 here, to indicate that we are done with
+ * the transfer. However, doing so indicates to the channel-handling
+ * code that the channel is done, and should be closed.
+ *
+ * In the case of scp, though, we want the client to close the
+ * connection, in order ensure that it has received all of the data
+ * (see Bug#3904).
*/
- return 1;
+ return 0;
}
return -1;
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
ProFTPD Committers Mailing List
proftpd-committers@proftpd.org
https://lists.sourceforge.net/lists/listinfo/proftp-committers
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic