summaryrefslogtreecommitdiff
path: root/nanoftp.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2001-10-19 09:48:35 +0000
committerDaniel Veillard <veillard@src.gnome.org>2001-10-19 09:48:35 +0000
commit9ae1eba967995e0e677bc8f1584e93f3b684fe21 (patch)
tree3308903c9b25745132d11cd7315f091827a6746b /nanoftp.c
parentce2c2f09973022cf064a65d5045c71b558ad2c43 (diff)
downloadlibxml2-9ae1eba967995e0e677bc8f1584e93f3b684fe21.tar.gz
use only "anonymous@" string for anonymous passwds removed bogus include
* nanoftp.c: use only "anonymous@" string for anonymous passwds * testThreads.c: removed bogus include Daniel
Diffstat (limited to 'nanoftp.c')
-rw-r--r--nanoftp.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/nanoftp.c b/nanoftp.c
index 9dc04cfd..e910fa08 100644
--- a/nanoftp.c
+++ b/nanoftp.c
@@ -99,7 +99,6 @@ typedef struct xmlNanoFTPCtxt {
int controlBufIndex;
int controlBufUsed;
int controlBufAnswer;
- char localhostname[100];
} xmlNanoFTPCtxt, *xmlNanoFTPCtxtPtr;
static int initialized = 0;
@@ -478,7 +477,6 @@ xmlNanoFTPNewCtxt(const char *URL) {
ret->returnValue = 0;
ret->controlBufIndex = 0;
ret->controlBufUsed = 0;
- gethostname(ret->localhostname, sizeof(ret->localhostname));
if (URL != NULL)
xmlNanoFTPScanURL(ret, URL);
@@ -777,7 +775,7 @@ xmlNanoFTPSendPasswd(void *ctx) {
int res;
if (ctxt->passwd == NULL)
- snprintf(buf, sizeof(buf), "PASS libxml@%s\r\n", ctxt->localhostname);
+ snprintf(buf, sizeof(buf), "PASS anonymous@\r\n");
else
snprintf(buf, sizeof(buf), "PASS %s\r\n", ctxt->passwd);
buf[sizeof(buf) - 1] = 0;
@@ -949,8 +947,7 @@ xmlNanoFTPConnect(void *ctx) {
if (proxyPasswd != NULL)
snprintf(buf, sizeof(buf), "PASS %s\r\n", proxyPasswd);
else
- snprintf(buf, sizeof(buf), "PASS libxml@%s\r\n",
- ctxt->localhostname);
+ snprintf(buf, sizeof(buf), "PASS anonymous@\r\n");
buf[sizeof(buf) - 1] = 0;
len = strlen(buf);
#ifdef DEBUG_FTP
@@ -1039,8 +1036,7 @@ xmlNanoFTPConnect(void *ctx) {
return(0);
}
if (ctxt->passwd == NULL)
- snprintf(buf, sizeof(buf), "PASS libxml@%s\r\n",
- ctxt->localhostname);
+ snprintf(buf, sizeof(buf), "PASS anonymous@\r\n");
else
snprintf(buf, sizeof(buf), "PASS %s\r\n", ctxt->passwd);
buf[sizeof(buf) - 1] = 0;