cURL / Mailing Lists / curl-users / Single Mail

curl-users

[ curl-Bugs-783116 ] FTP problem with persistent connections

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Mon, 04 Aug 2003 14:43:36 -0700

Bugs item #783116, was opened at 2003-08-04 16:43
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=783116&group_id=976

Category: ftp
Group: wrong behaviour
Status: Open
Resolution: None
Priority: 5
Submitted By: Salvatore Sorrentino (sal0530)
Assigned to: Daniel Stenberg (bagder)
Summary: FTP problem with persistent connections

Initial Comment:
When re-using a FTP connection, it is effectively
impossible to traverse backwards from a directory. The
problem it seems is that when you traverse forward in the
directory structure, the directories get stuck in a array
called "dirs[]" in the ftp structure of the connection. Every
time a new url is requested, cURL runs through this list
and perform a CWD on each of them.

I have patched around the problem by adding these lines
at the end of "ftp_perform()" function before it returns:

int i;
for (i=0; ftp->dirs[i]; i++) {
        ftp->dirs[i] = NULL;
}

This clears out the stored directory names, and I am now
able to traverse freely through the remote file system.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=783116&group_id=976

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-04