Commit 9ae1eba9 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

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
parent ce2c2f09
Fri Oct 19 11:47:13 CEST 2001 Daniel Veillard <daniel@veillard.com>
* nanoftp.c: use only "anonymous@" string for anonymous passwds
* testThreads.c: removed bogus include
Thu Oct 18 16:56:23 CEST 2001 Daniel Veillard <daniel@veillard.com>
* parser.c valid.c result/valid/rss.xml result/valid/rss.xml.err:
......
......@@ -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;
......
#include <stdlib.h>
#include <stdio.h>
#include <features.h>
#include <libxml/xmlversion.h>
#ifdef LIBXML_THREAD_ENABLED
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment