On the serf_error_callbacks branch: Add Serf error callback handling
using a context callback with our session as the baton. Assumes that
we use one Serf context per ra_serf session, which is currently true.
[in subversion/libsvn_ra_serf]
* ra_serf.h
(svn_ra_serf__session_t::serf_error): New member.
(svn_ra_serf__wrap_err_stack): New prototype and debug-mode macro.
* serf.c
(sess_error_callback): New; the Serf error callback.
(svn_ra_serf__open, ra_serf_dup_session): Register the callback when
the Serf context is created.
* util.c: Optionally include serf_bucket_util.h; it declares the required
prototype for serf_default_readline().
(conn_setup): When a new Serf SSL context was created, tell it to use
our session's error callback.
(svn_ra_serf__context_run): Report errors collected from Serf.
(bucket_limited_readline): Put this function in a conditional block,
otherwise we get a warning about an unused function when experimental
Serf features are turned on.
* util_error.c: Include stdarg.h.
(format_error_message): New; hoist error mesage formatting from
svn_ra_serf__wrap_err().
(svn_ra_serf__wrap_err): Delegate to format_error_message().
(svn_ra_serf__wrap_err_stack): Implement, using format_error_message().
git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/serf_error_callbacks@1931269 13f79535-47bb-0310-9956-ffa450edef68
4 files changed