aboutsummaryrefslogtreecommitdiff
path: root/lib/ssh.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-11-24 09:32:42 +0100
committerDaniel Stenberg <daniel@haxx.se>2015-11-24 09:36:45 +0100
commitc341311a0e875f4fc5229721c2f6ef19414f514e (patch)
tree910cbae630ca12c3e9da147c31d667425a0337eb /lib/ssh.c
parentfc5d783589268b7ee66a80173c48e940015b1787 (diff)
Revert "cleanup: general removal of TODO (and similar) comments"
This reverts commit 64e959ffe37c436503f9fed1ce2d6ee6ae50bd9a. Feedback-by: Dan Fandrich URL: http://curl.haxx.se/mail/lib-2015-11/0062.html
Diffstat (limited to 'lib/ssh.c')
-rw-r--r--lib/ssh.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index 2b01e94f5..f9bbdf104 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -296,6 +296,10 @@ static CURLcode libssh2_session_error_to_CURLE(int err)
return CURLE_AGAIN;
}
+ /* TODO: map some more of the libssh2 errors to the more appropriate CURLcode
+ error code, and possibly add a few new SSH-related one. We must however
+ not return or even depend on libssh2 errors in the public libcurl API */
+
return CURLE_SSH;
}
@@ -2820,8 +2824,10 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done)
if(data->set.str[STRING_SSH_KNOWNHOSTS]) {
int rc;
ssh->kh = libssh2_knownhost_init(ssh->ssh_session);
- if(!ssh->kh)
+ if(!ssh->kh) {
+ /* eeek. TODO: free the ssh_session! */
return CURLE_FAILED_INIT;
+ }
/* read all known hosts from there */
rc = libssh2_knownhost_readfile(ssh->kh,
@@ -2958,8 +2964,10 @@ static CURLcode ssh_done(struct connectdata *conn, CURLcode status)
if(!status) {
/* run the state-machine
- This should be using the ssh_multi_statemach function but we have no
- support for non-blocking DONE operations!
+ TODO: when the multi interface is used, this _really_ should be using
+ the ssh_multi_statemach function but we have no general support for
+ non-blocking DONE operations, not in the multi state machine and with
+ Curl_done() invokes on several places in the code!
*/
result = ssh_block_statemach(conn, FALSE);
}