[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Problems with 0.31.0

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2003-10-08 06:21:59 CEST

"C. Michael Pilato" <cmpilato@collab.net> writes:

> Diffs between neon-0.24.2 and neon-0.24.3 which include the string
> "Unknown error.":
>
> diff -ru neon-0.24.2/src/ne_xml.c neon-0.24.3/src/ne_xml.c
> --- neon-0.24.2/src/ne_xml.c 2003-05-10 11:05:59.000000000 -0500
> +++ neon-0.24.3/src/ne_xml.c 2003-09-25 14:05:58.000000000 -0500
> @@ -403,6 +403,7 @@
> p->current = p->root = ne_calloc(sizeof *p->root);
> p->root->default_ns = "";
> p->root->state = 0;
> + strcpy(p->error, _("Unknown error"));
> #ifdef HAVE_EXPAT
> p->parser = XML_ParserCreate(NULL);
> if (p->parser == NULL) {
> diff -ru neon-0.24.2/test/xml.c neon-0.24.3/test/xml.c
> --- neon-0.24.2/test/xml.c 2003-05-10 11:13:39.000000000 -0500
> +++ neon-0.24.3/test/xml.c 2003-09-25 14:05:58.000000000 -0500
> @@ -424,6 +438,9 @@
> ne_xml_parser *p = ne_xml_create();
> const char *err;
>
> + ONV(strcmp(ne_xml_get_error(p), "Unknown error") != 0,
> + ("initial error string unspecified"));
> +
> ne_xml_set_error(p, "Fish food");
> err = ne_xml_get_error(p);
>
> Joe, can you help us out here? Did we miss something important?

Hmm... we do this after all custom neon requests (from
libsvn_ra_dav/util.c:596):

  /* was there an XML parse error somewhere? */
  msg = ne_xml_get_error(success_parser);
  if (msg != NULL && *msg != '\0')
    {
      err = svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
                              "The %s request returned invalid XML "
                              "in the response: %s. (%s)",
                              method, msg, url);
      goto error;
    }

It would appear that in neon 0.24.3, the error is never left NULL, but
is instead initialized to "Unknown error". There must, then, be some
other way to check for an errorful state. Now... where is that
booger...

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 8 06:23:08 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.