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

Re: Neon 0.24 testing

From: Sergey A. Lipnevich <sergey_at_optimaltec.com>
Date: 2003-08-04 14:00:01 CEST

cmpilato@collab.net wrote:
> "Sergey A. Lipnevich" <sergey@optimaltec.com> writes:
>
>
>>Hi All,
>>
>>Could somebody please look at the following errors for basic_tests.py
>>#1? First of all, "old-style" (pre 0.24) callbacks, "startelm" and
>>"endelm" in props.c and fetch.c (I'm talking about libsvn_ra_dav)
>>sometimes return value 1, which is not defined by Neon interface. What
>>is defined is -1 (invalid XML) or -2 (decline element). If I treat
>>return 1 as error, I get test failure:
>
>
> This from ne_xml.h:
>
> /* Push a handler onto the handler stack for the given list of elements.
> * elements must be an array, with the last element .nspace being NULL.
> * Callbacks are called in order:
> * 1. validate_cb
> * 2. startelm_cb
> * 3. endelm_cb
> * (then back to the beginning again).
> * If any of the callbacks ever return non-zero, the parse will STOP.
> * userdata is passed as the first argument to startelm_cb and endelm_cb.
> */
> void ne_xml_push_handler(ne_xml_parser *p,
> const struct ne_xml_elm *elements,
> ne_xml_validate_cb validate_cb,
> ne_xml_startelm_cb startelm_cb,
> ne_xml_endelm_cb endelm_cb,
> void *userdata);
>
> I can't speak for the author of fetch.c, but when I rewrote the
> handlers for props.c, I was noting this: "If any of the callbacks ever
> return non-zero, the parse with STOP."

That explains it, thanks! There's a return code specifically defined for
this purpose: NE_XML_INVALID==-1 (or SVN_RA_DAV__XML_INVALID or
something like that), which in turn is NE_XML_ABORT==-1 in the new Neon
interface. With your permission I'll go on and change this 1 to
SVN_RA_DAV__XML_INVALID then, alright?

Sergey.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Aug 4 14:00:56 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.