cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re-using SFTP connection and CURLOPT_FTP_CREATE_MISSING_DIRS issue

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 13 Mar 2008 22:36:20 +0100 (CET)

On Thu, 13 Mar 2008, Brian Ulm wrote:

> Here is some quick code that reproduces the issue. Make sure that TestDir1
> and TestDir2 are not created on the server before running this.

Thanks! Here's the patch that made it work for me:

Index: lib/ssh.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/ssh.c,v
retrieving revision 1.96
diff -u -r1.96 ssh.c
--- lib/ssh.c 9 Mar 2008 11:37:48 -0000 1.96
+++ lib/ssh.c 13 Mar 2008 21:35:01 -0000
@@ -1966,8 +1966,10 @@
  {
    struct SessionHandle *data = conn->data;
    struct SSHPROTO *ssh;
+ struct ssh_conn *sshc = &conn->proto.sshc;

- conn->proto.sshc.actualcode = CURLE_OK; /* reset error code */
+ sshc->actualcode = CURLE_OK; /* reset error code */
+ sshc->secondCreateDirs =0; /* reset the create dir attempt state variable */

    if(data->state.proto.ssh)
      return CURLE_OK;

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2008-03-13