You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by kf...@collab.net on 2003/11/10 22:08:43 UTC

send_xml returns void in mod_dav_svn/update.c?

Greg, any idea why we ignore the result from apr_brigade_vprintf() and
just return void from send_xml() in this mod_dav_svn/update.c code:

static void send_xml(update_ctx_t *uc, const char *fmt, ...)
{
  va_list ap;

  va_start(ap, fmt);
  (void) apr_brigade_vprintf(uc->bb, ap_filter_flush, uc->output, fmt, ap);
  va_end(ap);
}

?

Almost all callers of send_xml() return (svn_error_t *), so if it
returned an error we would have a way to propagate that error.

But, there's probably some reason it's void?...

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: send_xml returns void in mod_dav_svn/update.c?

Posted by kf...@collab.net.
Greg Stein <gs...@lyra.org> writes:
> No particular reason. The potential for an error condition there is pretty
> small. Although (thinking about it), if the connection was terminated, you
> could abort the report process. (the brigade function has a fast-path
> return, but you'd still chunk thru the FS work)
> 
> Changing it to an svn_error_t, and propagating that should be just fine.
> I'd suggest that somewhere in the chain of callers of send_xml(), somebody
> should use use SVN_ERR_W() to target what was going on.

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: send_xml returns void in mod_dav_svn/update.c?

Posted by Greg Stein <gs...@lyra.org>.
On Mon, Nov 10, 2003 at 04:08:43PM -0600, kfogel@collab.net wrote:
> Greg, any idea why we ignore the result from apr_brigade_vprintf() and
> just return void from send_xml() in this mod_dav_svn/update.c code:
>...
> Almost all callers of send_xml() return (svn_error_t *), so if it
> returned an error we would have a way to propagate that error.
> 
> But, there's probably some reason it's void?...

No particular reason. The potential for an error condition there is pretty
small. Although (thinking about it), if the connection was terminated, you
could abort the report process. (the brigade function has a fast-path
return, but you'd still chunk thru the FS work)

Changing it to an svn_error_t, and propagating that should be just fine.
I'd suggest that somewhere in the chain of callers of send_xml(), somebody
should use use SVN_ERR_W() to target what was going on.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org