mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-01-12 09:17:37 +03:00
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
This commit is contained in:
parent
ce2c2f0997
commit
9ae1eba967
@ -1,3 +1,8 @@
|
||||
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:
|
||||
|
10
nanoftp.c
10
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;
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <features.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
|
Loading…
Reference in New Issue
Block a user