From 9ae1eba967995e0e677bc8f1584e93f3b684fe21 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Fri, 19 Oct 2001 09:48:35 +0000 Subject: [PATCH] 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 --- ChangeLog | 5 +++++ nanoftp.c | 10 +++------- testThreads.c | 1 - 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5ccff722..b7ed1c5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Oct 19 11:47:13 CEST 2001 Daniel Veillard + + * nanoftp.c: use only "anonymous@" string for anonymous passwds + * testThreads.c: removed bogus include + Thu Oct 18 16:56:23 CEST 2001 Daniel Veillard * parser.c valid.c result/valid/rss.xml result/valid/rss.xml.err: 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; diff --git a/testThreads.c b/testThreads.c index 044c90e1..310a2392 100644 --- a/testThreads.c +++ b/testThreads.c @@ -1,6 +1,5 @@ #include #include -#include #include #ifdef LIBXML_THREAD_ENABLED