curl-users
Are these bugs
Date: Sat, 31 Mar 2001 15:45:16 +0530
Hi,
I am using Windows 98 with MSVC 6.0 SP 3 and the library from the
distribution of version 7.7.
1. I had to add the processing for http_chunks.c to the makefile.vc6
otherwise it would not compile.
2. When a connection has not been established as in the case of a dial-up
connection, the library was giving access violations while attempting a ftp
download. This was happening because in the function curl_ftp_disconnect,
when the structure ftp was NULL, the members of the ftp structure were not
assigned. To correct this I changed the code in ftp.c for
curl_ftp_disconnect as follows
CURLcode Curl_ftp_disconnect(struct connectdata *conn)
{
struct FTP *ftp= conn->proto.ftp;
if (ftp != NULL) // Added this line
{ // added this line
if(ftp->user)
free(ftp->user);
if(ftp->passwd)
free(ftp->passwd);
if(ftp->entrypath)
free(ftp->entrypath);
} // added this line
return CURLE_OK;
}
3. Again when a connection was not established, the function curl_perform
in transfer.c would give access violation. To correct this, the following
changes were made at the begining of the function
CURLcode Curl_perform(CURL *curl)
{
CURLcode res;
struct UrlData *data = (struct UrlData *)curl;
struct connectdata *conn=NULL;
bool port=TRUE; /* allow data->use_port to set port to use */
Curl_pgrsStartNow(data);
do {
Curl_pgrsTime(data, TIMER_STARTSINGLE);
res = Curl_connect(data, &conn, port);
if (res != CURLE_OK) // added this line
conn = NULL; // added this line
if(res == CURLE_OK) {
and the following changes were made at the end of the function
if (conn != NULL) // added this line
{ // added this line
if(conn->newurl) {
free(conn->newurl);
conn->newurl = NULL;
}
} // added this line
return res;
}
I hope this information would help in making the library better. There may
be a better solution to this which you might be able to find with your
inside knowledge of the library.
Please let me know if you approve of these changes.
Regards
Puneet
Received on 2001-03-31