]> granicus.if.org Git - curl/commitdiff
ssh: honour the CURLINFO_FTP_ENTRY_PATH curl_getinfo option
authorLuke Amery <lamery@ontech.com.au>
Thu, 30 Dec 2010 01:43:45 +0000 (12:43 +1100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 30 Dec 2010 22:42:44 +0000 (23:42 +0100)
lib/ssh.c

index ffcb48b4216ec50d3766aab238b8a33a7e185faf..895e34ee40f176e713ad5609f0778130452347fd 100644 (file)
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -985,6 +985,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
           sshc->actualcode = CURLE_OUT_OF_MEMORY;
           break;
         }
+        conn->data->state.most_recent_ftp_entrypath = sshc->homedir;
       }
       else {
         /* Return the error type */
@@ -2072,6 +2073,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
 
       Curl_safefree(sshc->homedir);
       sshc->homedir = NULL;
+      conn->data->state.most_recent_ftp_entrypath = NULL;
 
       state(conn, SSH_SESSION_DISCONNECT);
       break;
@@ -2290,6 +2292,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
 
       Curl_safefree(sshc->homedir);
       sshc->homedir = NULL;
+      conn->data->state.most_recent_ftp_entrypath = NULL;
 
       state(conn, SSH_SESSION_FREE);
       break;