aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-03-13 14:10:27 +0100
committerDaniel Stenberg <daniel@haxx.se>2011-03-13 14:10:27 +0100
commitca37692bf43b5ef0308f1c0bdd0d9cbbf9a3bd19 (patch)
treea1130b7728b09bbcad7629281a39576ecfdcf071 /lib
parent176092d760eb275db81c8fe7b9210f5b58098266 (diff)
ssh_statemach_act: set cselect for sftp upload
For uploads we want to use the _sending_ function even when the socket turns out readable as the underlying libssh2 sftp send function will deal with both accordingly. This is what the cselect_bits magic is for. Fixes test 582.
Diffstat (limited to 'lib')
-rw-r--r--lib/ssh.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index 434b80d06..118611efc 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -1599,6 +1599,11 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
figure out a "real" bitmask */
sshc->orig_waitfor = data->req.keepon;
+ /* we want to use the _sending_ function even when the socket turns
+ out readable as the underlying libssh2 sftp send function will deal
+ with both accordingly */
+ conn->cselect_bits = CURL_CSELECT_OUT;
+
/* since we don't really wait for anything at this point, we want the
state machine to move on as soon as possible so we set a very short
timeout here */