# HG changeset patch # User masneyb # Date 1074458380 0 # Node ID f514f510ebaaa526cf8e4773d77834cdd06fccdc # Parent c63208a1f0f1e9d9c27ceb45eab7b9e692162179 2003-1-18 Brian Masney * lib/rfc959.c (rfc959_connect) - if the username is anonymous and a password is already supplied, don't clobber it. diff -r c63208a1f0f1 -r f514f510ebaa ChangeLog --- a/ChangeLog Sun Jan 18 20:30:08 2004 +0000 +++ b/ChangeLog Sun Jan 18 20:39:40 2004 +0000 @@ -1,4 +1,7 @@ 2003-1-18 Brian Masney + * lib/rfc959.c (rfc959_connect) - if the username is anonymous and a + password is already supplied, don't clobber it. + * lib/misc.c (gftp_build_path) - when checking for already existing /'s, not only look at the end of the currently built string, but look at the beginning of the token that is about to be added @@ -2019,7 +2022,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.203 2004/01/18 20:30:08 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.204 2004/01/18 20:39:39 masneyb Exp $ tags * debian/* - updated files from Debian maintainer diff -r c63208a1f0f1 -r f514f510ebaa lib/rfc959.c --- a/lib/rfc959.c Sun Jan 18 20:30:08 2004 +0000 +++ b/lib/rfc959.c Sun Jan 18 20:39:40 2004 +0000 @@ -451,17 +451,18 @@ parms = request->protocol_data; - gftp_lookup_request_option (request, "email", &email); gftp_lookup_request_option (request, "ftp_proxy_host", &proxy_hostname); gftp_lookup_request_option (request, "ftp_proxy_port", &proxy_port); if (request->username == NULL || *request->username == '\0') + gftp_set_username (request, "anonymous"); + + if (strcasecmp (request->username, "anonymous") == 0 && + (request->password == NULL || *request->password == '\0')) { - gftp_set_username (request, "anonymous"); + gftp_lookup_request_option (request, "email", &email); gftp_set_password (request, email); } - else if (strcasecmp (request->username, "anonymous") == 0) - gftp_set_password (request, email); if ((ret = gftp_connect_server (request, "ftp", proxy_hostname, proxy_port)) < 0) return (ret);