Commit c69e0b17 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

applied a couple of patches from Brian D Ripley. removed the last exit()

* nanoftp.c: applied a couple of patches from Brian D Ripley.
* parserInternals.c: removed the last exit() call. Print an
  unmaskable error on stderr instead (library mismatch detection)
Daniel
parent 42304046
Tue Nov 20 09:30:02 CET 2001 Daniel Veillard <daniel@veillard.com>
* nanoftp.c: applied a couple of patches from Brian D Ripley.
* parserInternals.c: removed the last exit() call. Print an
unmaskable error on stderr instead (library mismatch detection)
Sat Nov 17 17:16:51 MST 2001 John Fleck <jfleck@inkstain.net>
* doc/xmllint.xml, doc/xmllint.1 - update xmllint man page with
......
......@@ -261,6 +261,31 @@ xmlNanoFTPScanURL(void *ctx, const char *URL) {
if (*cur == 0) return;
buf[indx] = 0;
/* allow user@ and user:pass@ forms */
{
const char *p = strchr(cur, '@');
if(p) {
while(1) {
if(cur[0] == ':' || cur[0] == '@') break;
buf[indx++] = *cur++;
}
buf[indx] = 0;
ctxt->user = xmlMemStrdup(buf);
indx = 0;
if(cur[0] == ':') {
cur++;
while(1) {
if(cur[0] == '@') break;
buf[indx++] = *cur++;
}
buf[indx] = 0;
ctxt->passwd = xmlMemStrdup(buf);
indx = 0;
}
cur = p+1;
}
}
while (1) {
if (cur[0] == ':') {
buf[indx] = 0;
......@@ -480,6 +505,7 @@ xmlNanoFTPNewCtxt(const char *URL) {
ret->returnValue = 0;
ret->controlBufIndex = 0;
ret->controlBufUsed = 0;
ret->controlFd = -1;
if (URL != NULL)
xmlNanoFTPScanURL(ret, URL);
......
......@@ -81,7 +81,9 @@ xmlCheckVersion(int version) {
xmlGenericError(xmlGenericErrorContext,
"Fatal: program compiled against libxml %d using libxml %d\n",
(version / 10000), (myversion / 10000));
exit(1);
fprintf(stderr,
"Fatal: program compiled against libxml %d using libxml %d\n",
(version / 10000), (myversion / 10000));
}
if ((myversion / 100) < (version / 100)) {
xmlGenericError(xmlGenericErrorContext,
......
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