diff options
author | Björn Stenberg <bjorn@haxx.se> | 2018-02-10 15:13:15 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-02-15 09:36:03 +0100 |
commit | b46cfbc068ebe90f18e9777b9e877e4934c1b5e3 (patch) | |
tree | 4d88b0f4d9492f51a93251e488400ff7a8abba62 /lib/ssh-libssh.c | |
parent | 43a50a2580db2bfb28483a96964ae27b584472da (diff) | |
download | curl-b46cfbc068ebe90f18e9777b9e877e4934c1b5e3.tar.gz |
TODO fixed: Detect when called from within callbacks
Closes #2302
Diffstat (limited to 'lib/ssh-libssh.c')
-rw-r--r-- | lib/ssh-libssh.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ssh-libssh.c b/lib/ssh-libssh.c index d821c4a37..9e6667295 100644 --- a/lib/ssh-libssh.c +++ b/lib/ssh-libssh.c @@ -383,8 +383,10 @@ static int myssh_is_known(struct connectdata *conn) } /* we don't have anything equivalent to knownkey. Always NULL */ + Curl_set_in_callback(data, true); rc = func(data, NULL, &foundkey, /* from the remote host */ keymatch, data->set.ssh_keyfunc_userp); + Curl_set_in_callback(data, false); switch(rc) { case CURLKHSTAT_FINE_ADD_TO_FILE: @@ -1128,8 +1130,10 @@ static CURLcode myssh_statemach_act(struct connectdata *conn, bool *block) if(data->state.resume_from > 0) { /* Let's read off the proper amount of bytes from the input. */ if(conn->seek_func) { + Curl_set_in_callback(data, true); seekerr = conn->seek_func(conn->seek_client, data->state.resume_from, SEEK_SET); + Curl_set_in_callback(data, false); } if(seekerr != CURL_SEEKFUNC_OK) { |