Skip to content

Commit ac4bf81

Browse files
committed
address review feedback
1 parent 6c431e8 commit ac4bf81

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

regress/channel-timeout.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ rm -f $OBJ/sshd_proxy.orig
99
cp $OBJ/sshd_proxy $OBJ/sshd_proxy.orig
1010

1111
verbose "no timeout"
12-
${SSH} -vvv -F $OBJ/ssh_proxy somehost "sleep 5 ; exit 23"
12+
${SSH} -F $OBJ/ssh_proxy somehost "sleep 5 ; exit 23"
1313
r=$?
1414
if [ $r -ne 23 ]; then
1515
fail "ssh failed"
@@ -19,7 +19,7 @@ verbose "command timeout"
1919
(cat $OBJ/sshd_proxy.orig ; echo "ChannelTimeout session:command=1") \
2020
> $OBJ/sshd_proxy
2121
verbose "${SSH} -vvv -F $OBJ/ssh_proxy somehost"
22-
${SSH} -vvv -F $OBJ/ssh_proxy somehost "sleep 5 ; exit 23"
22+
${SSH} -F $OBJ/ssh_proxy somehost "sleep 5 ; exit 23"
2323
r=$?
2424
# return value is -1 which is being mapped back to 127 instead of 255 for some reason
2525
if [ $r -ne 127 ]; then

scp.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,9 @@ pid_t do_cmd_pid2 = -1;
185185

186186
/* SFTP copy parameters */
187187
#ifdef WINDOWS
188-
// match DEFAULT_COPY_BUFLEN from sftp-client.c unless overriden below with -X input
189-
size_t sftp_copy_buflen = 32768;
188+
#define MAX_SFTP_COPY_BUFLEN 204800
189+
#define DEFAULT_COPY_BUFLEN 32768
190+
size_t sftp_copy_buflen = DEFAULT_COPY_BUFLEN;
190191
#else
191192
size_t sftp_copy_buflen;
192193
#endif // WINDOWS
@@ -776,13 +777,12 @@ main(int argc, char **argv)
776777
}
777778
sftp_copy_buflen = (size_t)llv;
778779
#ifdef WINDOWS
779-
size_t max_sftp_buf_len = 204800;
780-
if (sftp_copy_buflen > max_sftp_buf_len) {
780+
if (sftp_copy_buflen > MAX_SFTP_COPY_BUFLEN) {
781781
if (verbose_mode)
782782
fmprintf(stderr,
783783
"Buffer value of %d is too large for Win32-OpenSSH. Setting buffer to %d\n",
784-
sftp_copy_buflen, max_sftp_buf_len);
785-
sftp_copy_buflen = max_sftp_buf_len;
784+
sftp_copy_buflen, MAX_SFTP_COPY_BUFLEN);
785+
sftp_copy_buflen = MAX_SFTP_COPY_BUFLEN;
786786
}
787787
#endif // WINDOWS
788788
} else if (strncmp(optarg, "nrequests=", 10) == 0) {

0 commit comments

Comments
 (0)