cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ftp'ing multiple files

From: Rodney Simmons <imauafan_at_yahoo.com>
Date: Mon, 14 May 2001 05:59:03 -0700 (PDT)

The fix works great! Thanks!

--- Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Thu, 10 May 2001, Rodney Simmons wrote:
>
> > The patch didn't seem to work for me. Here
> is the verbose output:
>
> Obviously, I didn't take all things into
> account.
>
> Now, this is getting a bit icky as the previous
> patch was already applied and
> fixing this means another patch on the patched
> sources.
>
> I've now verified my new fix with multiple FTP
> downloads and multiple FTP
> uploads.
>
> The applied patch should be applied *INSTEAD*
> of the previously posted
> (multiple ftp file) patch.
>
> If in doubt, get your fresh copy from CVS or
> have a glance on the most recent
> lib/url.c section at:
>
> http://curl.haxx.se/lxr/source/lib/url.c#L2020
>
> --
> Daniel Stenberg -- curl project maintainer --
> http://curl.haxx.se/
> > Index: url.c
>
===================================================================
> RCS file: /cvsroot/curl/lib/url.c,v
> retrieving revision 1.121
> diff -u -r1.121 url.c
> --- url.c 2001/05/04 07:47:11 1.121
> +++ url.c 2001/05/11 06:35:36
> @@ -2019,21 +2019,26 @@
> */
> struct connectdata *old_conn = conn;
> char *path = old_conn->path; /* setup the
> current path pointer properly */
> + char *ppath = old_conn->ppath; /* this is
> the modified path pointer */
> if(old_conn->proxyhost)
> free(old_conn->proxyhost);
> conn = conn_temp; /* use this
> connection from now on */
> - free(conn->path); /* free the
> previous path pointer */
>
> /* we need these pointers if we speak over
> a proxy */
> conn->name = conn->gname;
> conn->hostname = old_conn->gname;
>
> - conn->path = path; /* use this one
> */
> - conn->ppath = path; /* set this too
> */
> + free(conn->path); /* free the
> previously allocated path pointer */
>
> + /* 'path' points to the allocated data,
> 'ppath' may have been advanced
> + to point somewhere within the 'path'
> area. */
> + conn->path = path;
> + conn->ppath = ppath;
> +
> /* re-use init */
> conn->bits.reuse = TRUE; /* yes, we're
> re-using here */
> - conn->bits.chunk = FALSE; /* always assume
> not chunked unless told otherwise */
> + conn->bits.chunk = FALSE; /* always assume
> not chunked unless told
> + otherwise */
> conn->maxdownload = -1; /* might have
> been used previously! */
>
> free(old_conn); /* we don't need
> this anymore */
>

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-05-14