mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-30 22:43:14 +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:
@ -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>
|
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:
|
* 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 controlBufIndex;
|
||||||
int controlBufUsed;
|
int controlBufUsed;
|
||||||
int controlBufAnswer;
|
int controlBufAnswer;
|
||||||
char localhostname[100];
|
|
||||||
} xmlNanoFTPCtxt, *xmlNanoFTPCtxtPtr;
|
} xmlNanoFTPCtxt, *xmlNanoFTPCtxtPtr;
|
||||||
|
|
||||||
static int initialized = 0;
|
static int initialized = 0;
|
||||||
@ -478,7 +477,6 @@ xmlNanoFTPNewCtxt(const char *URL) {
|
|||||||
ret->returnValue = 0;
|
ret->returnValue = 0;
|
||||||
ret->controlBufIndex = 0;
|
ret->controlBufIndex = 0;
|
||||||
ret->controlBufUsed = 0;
|
ret->controlBufUsed = 0;
|
||||||
gethostname(ret->localhostname, sizeof(ret->localhostname));
|
|
||||||
|
|
||||||
if (URL != NULL)
|
if (URL != NULL)
|
||||||
xmlNanoFTPScanURL(ret, URL);
|
xmlNanoFTPScanURL(ret, URL);
|
||||||
@ -777,7 +775,7 @@ xmlNanoFTPSendPasswd(void *ctx) {
|
|||||||
int res;
|
int res;
|
||||||
|
|
||||||
if (ctxt->passwd == NULL)
|
if (ctxt->passwd == NULL)
|
||||||
snprintf(buf, sizeof(buf), "PASS libxml@%s\r\n", ctxt->localhostname);
|
snprintf(buf, sizeof(buf), "PASS anonymous@\r\n");
|
||||||
else
|
else
|
||||||
snprintf(buf, sizeof(buf), "PASS %s\r\n", ctxt->passwd);
|
snprintf(buf, sizeof(buf), "PASS %s\r\n", ctxt->passwd);
|
||||||
buf[sizeof(buf) - 1] = 0;
|
buf[sizeof(buf) - 1] = 0;
|
||||||
@ -949,8 +947,7 @@ xmlNanoFTPConnect(void *ctx) {
|
|||||||
if (proxyPasswd != NULL)
|
if (proxyPasswd != NULL)
|
||||||
snprintf(buf, sizeof(buf), "PASS %s\r\n", proxyPasswd);
|
snprintf(buf, sizeof(buf), "PASS %s\r\n", proxyPasswd);
|
||||||
else
|
else
|
||||||
snprintf(buf, sizeof(buf), "PASS libxml@%s\r\n",
|
snprintf(buf, sizeof(buf), "PASS anonymous@\r\n");
|
||||||
ctxt->localhostname);
|
|
||||||
buf[sizeof(buf) - 1] = 0;
|
buf[sizeof(buf) - 1] = 0;
|
||||||
len = strlen(buf);
|
len = strlen(buf);
|
||||||
#ifdef DEBUG_FTP
|
#ifdef DEBUG_FTP
|
||||||
@ -1039,8 +1036,7 @@ xmlNanoFTPConnect(void *ctx) {
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
if (ctxt->passwd == NULL)
|
if (ctxt->passwd == NULL)
|
||||||
snprintf(buf, sizeof(buf), "PASS libxml@%s\r\n",
|
snprintf(buf, sizeof(buf), "PASS anonymous@\r\n");
|
||||||
ctxt->localhostname);
|
|
||||||
else
|
else
|
||||||
snprintf(buf, sizeof(buf), "PASS %s\r\n", ctxt->passwd);
|
snprintf(buf, sizeof(buf), "PASS %s\r\n", ctxt->passwd);
|
||||||
buf[sizeof(buf) - 1] = 0;
|
buf[sizeof(buf) - 1] = 0;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <features.h>
|
|
||||||
#include <libxml/xmlversion.h>
|
#include <libxml/xmlversion.h>
|
||||||
|
|
||||||
#ifdef LIBXML_THREAD_ENABLED
|
#ifdef LIBXML_THREAD_ENABLED
|
||||||
|
Reference in New Issue
Block a user