You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2012/03/27 01:23:49 UTC
svn commit: r1305667 [4/7] - in /subversion/branches/inheritable-props: ./
subversion/bindings/swig/python/svn/ subversion/bindings/swig/python/tests/
subversion/bindings/swig/ruby/svn/ subversion/bindings/swig/ruby/test/
subversion/include/private/ su...
Modified: subversion/branches/inheritable-props/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_ra_serf/ra_serf.h?rev=1305667&r1=1305666&r2=1305667&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_ra_serf/ra_serf.h Mon Mar 26 23:23:46 2012
@@ -324,12 +324,6 @@ svn_ra_serf__conn_setup(apr_socket_t *so
void *baton,
apr_pool_t *pool);
-serf_bucket_t*
-svn_ra_serf__accept_response(serf_request_t *request,
- serf_bucket_t *stream,
- void *acceptor_baton,
- apr_pool_t *pool);
-
void
svn_ra_serf__conn_closed(serf_connection_t *conn,
void *closed_baton,
@@ -356,24 +350,6 @@ svn_ra_serf__handle_client_cert_pw(void
const char *cert_path,
const char **password);
-/*
- * Create a REQUEST with an associated REQ_BKT in the SESSION.
- *
- * If HDRS_BKT is not-NULL, it will be set to a headers_bucket that
- * corresponds to the new request.
- *
- * The request will be METHOD at URL.
- *
- * If BODY_BKT is not-NULL, it will be sent as the request body.
- *
- * If CONTENT_TYPE is not-NULL, it will be sent as the Content-Type header.
- */
-svn_error_t *
-svn_ra_serf__setup_serf_req(serf_request_t *request,
- serf_bucket_t **req_bkt, serf_bucket_t **hdrs_bkt,
- svn_ra_serf__connection_t *conn,
- const char *method, const char *url,
- serf_bucket_t *body_bkt, const char *content_type);
/*
* This function will run the serf context in SESS until *DONE is TRUE.
@@ -390,29 +366,20 @@ typedef svn_error_t *
void *handler_baton,
apr_pool_t *pool);
-/* Callback for setting up a complete serf request */
-typedef svn_error_t *
-(*svn_ra_serf__request_setup_t)(serf_request_t *request,
- void *setup_baton,
- serf_bucket_t **req_bkt,
- serf_response_acceptor_t *acceptor,
- void **acceptor_baton,
- svn_ra_serf__response_handler_t *handler,
- void **handler_baton,
- apr_pool_t *pool);
-
/* Callback for when a request body is needed. */
+/* ### should pass a scratch_pool */
typedef svn_error_t *
(*svn_ra_serf__request_body_delegate_t)(serf_bucket_t **body_bkt,
void *baton,
serf_bucket_alloc_t *alloc,
- apr_pool_t *pool);
+ apr_pool_t *request_pool);
/* Callback for when request headers are needed. */
+/* ### should pass a scratch_pool */
typedef svn_error_t *
(*svn_ra_serf__request_header_delegate_t)(serf_bucket_t *headers,
void *baton,
- apr_pool_t *pool);
+ apr_pool_t *request_pool);
/* Callback for when a response has an error. */
typedef svn_error_t *
@@ -446,15 +413,6 @@ typedef struct svn_ra_serf__handler_t {
svn_ra_serf__response_error_t response_error;
void *response_error_baton;
- /* This function and baton will be executed when the request is about
- * to be delivered by serf.
- *
- * This just passes through serf's raw request creation parameters.
- * None of the other parameters will be utilized if this field is set.
- */
- svn_ra_serf__request_setup_t setup;
- void *setup_baton;
-
/* This function and baton pair allows for custom request headers to
* be set.
*
@@ -518,30 +476,28 @@ typedef struct svn_ra_serf__xml_parser_t
*/
typedef svn_error_t *
(*svn_ra_serf__xml_start_element_t)(svn_ra_serf__xml_parser_t *parser,
- void *baton,
svn_ra_serf__dav_props_t name,
- const char **attrs);
+ const char **attrs,
+ apr_pool_t *scratch_pool);
/* Callback invoked with @a baton by our XML @a parser when an element with
* the @a name is closed.
*/
typedef svn_error_t *
(*svn_ra_serf__xml_end_element_t)(svn_ra_serf__xml_parser_t *parser,
- void *baton,
- svn_ra_serf__dav_props_t name);
+ svn_ra_serf__dav_props_t name,
+ apr_pool_t *scratch_pool);
/* Callback invoked with @a baton by our XML @a parser when a CDATA portion
* of @a data with size @a len is encountered.
*
* This may be invoked multiple times for the same tag.
- *
- * @see svn_ra_serf__expand_string
*/
typedef svn_error_t *
(*svn_ra_serf__xml_cdata_chunk_handler_t)(svn_ra_serf__xml_parser_t *parser,
- void *baton,
const char *data,
- apr_size_t len);
+ apr_size_t len,
+ apr_pool_t *scratch_pool);
/*
* Helper structure associated with handle_xml_parser handler that will
@@ -890,16 +846,6 @@ svn_ra_serf__expand_ns(svn_ra_serf__dav_
svn_ra_serf__ns_t *ns_list,
const char *name);
-/*
- * Expand the string represented by @a cur with a current size of @a
- * cur_len by appending @a new with a size of @a new_len.
- *
- * The reallocated string is made in @a pool.
- */
-void
-svn_ra_serf__expand_string(const char **cur, apr_size_t *cur_len,
- const char *new, apr_size_t new_len,
- apr_pool_t *pool);
/** PROPFIND-related functions **/
Modified: subversion/branches/inheritable-props/subversion/libsvn_ra_serf/replay.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_ra_serf/replay.c?rev=1305667&r1=1305666&r2=1305667&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_ra_serf/replay.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_ra_serf/replay.c Mon Mar 26 23:23:46 2012
@@ -176,11 +176,11 @@ push_state(svn_ra_serf__xml_parser_t *pa
static svn_error_t *
start_replay(svn_ra_serf__xml_parser_t *parser,
- void *userData,
svn_ra_serf__dav_props_t name,
- const char **attrs)
+ const char **attrs,
+ apr_pool_t *scratch_pool)
{
- replay_context_t *ctx = userData;
+ replay_context_t *ctx = parser->user_data;
replay_state_e state;
state = parser->state->current_state;
@@ -473,10 +473,10 @@ start_replay(svn_ra_serf__xml_parser_t *
static svn_error_t *
end_replay(svn_ra_serf__xml_parser_t *parser,
- void *userData,
- svn_ra_serf__dav_props_t name)
+ svn_ra_serf__dav_props_t name,
+ apr_pool_t *scratch_pool)
{
- replay_context_t *ctx = userData;
+ replay_context_t *ctx = parser->user_data;
replay_state_e state;
state = parser->state->current_state;
@@ -538,6 +538,9 @@ end_replay(svn_ra_serf__xml_parser_t *pa
const svn_string_t *morph;
morph = svn_stringbuf__morph_into_string(info->prop_value);
+#ifdef SVN_DEBUG
+ info->prop_value = NULL; /* morph killed the stringbuf. */
+#endif
if (strcmp(name.name, "change-file-prop") == 0)
prop_val = svn_base64_decode_string(morph, ctx->file_pool);
@@ -555,11 +558,11 @@ end_replay(svn_ra_serf__xml_parser_t *pa
static svn_error_t *
cdata_replay(svn_ra_serf__xml_parser_t *parser,
- void *userData,
const char *data,
- apr_size_t len)
+ apr_size_t len,
+ apr_pool_t *scratch_pool)
{
- replay_context_t *replay_ctx = userData;
+ replay_context_t *replay_ctx = parser->user_data;
replay_state_e state;
UNUSED_CTX(replay_ctx);
Modified: subversion/branches/inheritable-props/subversion/libsvn_ra_serf/sb_bucket.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_ra_serf/sb_bucket.c?rev=1305667&r1=1305666&r2=1305667&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_ra_serf/sb_bucket.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_ra_serf/sb_bucket.c Mon Mar 26 23:23:46 2012
@@ -24,6 +24,7 @@
#include <serf.h>
#include <serf_bucket_util.h>
+#include "svn_private_config.h"
#include "private/svn_subr_private.h"
#include "ra_serf.h"
@@ -60,8 +61,8 @@ svn_ra_serf__copy_into_spillbuf(svn_spil
status = serf_bucket_read(bkt, SERF_READ_ALL_AVAIL, &data, &len);
- /* ### we should throw an error, if the bucket does. */
- SVN_ERR_ASSERT(status == APR_SUCCESS || status == APR_EOF);
+ if (status != APR_SUCCESS && status != APR_EOF)
+ return svn_error_wrap_apr(status, _("Failed to read the request"));
SVN_ERR(svn_spillbuf__write(*spillbuf, data, len, scratch_pool));
Modified: subversion/branches/inheritable-props/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_ra_serf/update.c?rev=1305667&r1=1305666&r2=1305667&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_ra_serf/update.c Mon Mar 26 23:23:46 2012
@@ -43,6 +43,7 @@
#include "svn_private_config.h"
#include "private/svn_dep_compat.h"
#include "private/svn_fspath.h"
+#include "private/svn_string_private.h"
#include "ra_serf.h"
#include "../libsvn_ra/ra_loader.h"
@@ -241,8 +242,7 @@ typedef struct report_info_t
*/
const char *prop_ns;
const char *prop_name;
- const char *prop_val;
- apr_size_t prop_val_len;
+ svn_stringbuf_t *prop_value;
const char *prop_encoding;
} report_info_t;
@@ -397,6 +397,7 @@ push_state(svn_ra_serf__xml_parser_t *pa
new_info = apr_pcalloc(info_parent_pool, sizeof(*new_info));
new_info->pool = svn_pool_create(info_parent_pool);
new_info->lock_token = NULL;
+ new_info->prop_value = svn_stringbuf_create_empty(new_info->pool);
new_info->dir = apr_pcalloc(new_info->pool, sizeof(*new_info->dir));
new_info->dir->pool = new_info->pool;
@@ -441,6 +442,7 @@ push_state(svn_ra_serf__xml_parser_t *pa
new_info->file_baton = NULL;
new_info->lock_token = NULL;
new_info->fetch_file = FALSE;
+ new_info->prop_value = svn_stringbuf_create_empty(new_info->pool);
/* Point at our parent's directory state. */
new_info->dir = info->dir;
@@ -1327,11 +1329,11 @@ fetch_file(report_context_t *ctx, report
static svn_error_t *
start_report(svn_ra_serf__xml_parser_t *parser,
- void *userData,
svn_ra_serf__dav_props_t name,
- const char **attrs)
+ const char **attrs,
+ apr_pool_t *scratch_pool)
{
- report_context_t *ctx = userData;
+ report_context_t *ctx = parser->user_data;
report_state_e state;
state = parser->state->current_state;
@@ -1645,8 +1647,7 @@ start_report(svn_ra_serf__xml_parser_t *
info->prop_ns = name.namespace;
info->prop_name = apr_pstrdup(parser->state->pool, name.name);
info->prop_encoding = NULL;
- info->prop_val = NULL;
- info->prop_val_len = 0;
+ svn_stringbuf_setempty(info->prop_value);
}
else if (strcmp(name.name, "set-prop") == 0 ||
strcmp(name.name, "remove-prop") == 0)
@@ -1675,8 +1676,7 @@ start_report(svn_ra_serf__xml_parser_t *
colon - full_prop_name);
info->prop_name = apr_pstrdup(parser->state->pool, colon);
info->prop_encoding = svn_xml_get_attr_value("encoding", attrs);
- info->prop_val = NULL;
- info->prop_val_len = 0;
+ svn_stringbuf_setempty(info->prop_value);
}
else if (strcmp(name.name, "prop") == 0)
{
@@ -1707,8 +1707,7 @@ start_report(svn_ra_serf__xml_parser_t *
info->prop_ns = name.namespace;
info->prop_name = apr_pstrdup(parser->state->pool, name.name);
info->prop_encoding = NULL;
- info->prop_val = NULL;
- info->prop_val_len = 0;
+ svn_stringbuf_setempty(info->prop_value);
}
else if (strcmp(name.name, "prop") == 0)
{
@@ -1763,8 +1762,7 @@ start_report(svn_ra_serf__xml_parser_t *
colon - full_prop_name);
info->prop_name = apr_pstrdup(parser->state->pool, colon);
info->prop_encoding = svn_xml_get_attr_value("encoding", attrs);
- info->prop_val = NULL;
- info->prop_val_len = 0;
+ svn_stringbuf_setempty(info->prop_value);
}
else
{
@@ -1787,8 +1785,7 @@ start_report(svn_ra_serf__xml_parser_t *
info->prop_ns = name.namespace;
info->prop_name = apr_pstrdup(parser->state->pool, name.name);
info->prop_encoding = svn_xml_get_attr_value("encoding", attrs);
- info->prop_val = NULL;
- info->prop_val_len = 0;
+ svn_stringbuf_setempty(info->prop_value);
}
return SVN_NO_ERROR;
@@ -1796,10 +1793,10 @@ start_report(svn_ra_serf__xml_parser_t *
static svn_error_t *
end_report(svn_ra_serf__xml_parser_t *parser,
- void *userData,
- svn_ra_serf__dav_props_t name)
+ svn_ra_serf__dav_props_t name,
+ apr_pool_t *scratch_pool)
{
- report_context_t *ctx = userData;
+ report_context_t *ctx = parser->user_data;
report_state_e state;
state = parser->state->current_state;
@@ -1950,7 +1947,7 @@ end_report(svn_ra_serf__xml_parser_t *pa
}
else if (state == PROP)
{
- /* We need to move the prop_ns, prop_name, and prop_val into the
+ /* We need to move the prop_ns, prop_name, and prop_value into the
* same lifetime as the dir->pool.
*/
svn_ra_serf__ns_t *ns, *ns_name_match;
@@ -1958,8 +1955,7 @@ end_report(svn_ra_serf__xml_parser_t *pa
report_info_t *info;
report_dir_t *dir;
apr_hash_t *props;
- const char *set_val;
- svn_string_t *set_val_str;
+ const svn_string_t *set_val_str;
apr_pool_t *pool;
info = parser->state->private;
@@ -2009,24 +2005,21 @@ end_report(svn_ra_serf__xml_parser_t *pa
{
props = dir->removed_props;
pool = dir->pool;
- info->prop_val = "";
- info->prop_val_len = 1;
+ svn_stringbuf_setempty(info->prop_value);
}
if (info->prop_encoding)
{
if (strcmp(info->prop_encoding, "base64") == 0)
{
- svn_string_t encoded;
- const svn_string_t *decoded;
+ svn_string_t tmp;
- encoded.data = info->prop_val;
- encoded.len = info->prop_val_len;
+ /* Don't use morph_info_string cuz we need prop_value to
+ remain usable. */
+ tmp.data = info->prop_value->data;
+ tmp.len = info->prop_value->len;
- decoded = svn_base64_decode_string(&encoded, parser->state->pool);
-
- info->prop_val = decoded->data;
- info->prop_val_len = decoded->len;
+ set_val_str = svn_base64_decode_string(&tmp, pool);
}
else
{
@@ -2035,11 +2028,11 @@ end_report(svn_ra_serf__xml_parser_t *pa
_("Got unrecognized encoding '%s'"),
info->prop_encoding);
}
-
}
-
- set_val = apr_pmemdup(pool, info->prop_val, info->prop_val_len);
- set_val_str = svn_string_ncreate(set_val, info->prop_val_len, pool);
+ else
+ {
+ set_val_str = svn_string_create_from_buf(info->prop_value, pool);
+ }
svn_ra_serf__set_ver_prop(props, info->base_name, info->base_rev,
ns->namespace, ns->url, set_val_str, pool);
@@ -2055,11 +2048,11 @@ end_report(svn_ra_serf__xml_parser_t *pa
static svn_error_t *
cdata_report(svn_ra_serf__xml_parser_t *parser,
- void *userData,
const char *data,
- apr_size_t len)
+ apr_size_t len,
+ apr_pool_t *scratch_pool)
{
- report_context_t *ctx = userData;
+ report_context_t *ctx = parser->user_data;
UNUSED_CTX(ctx);
@@ -2067,8 +2060,7 @@ cdata_report(svn_ra_serf__xml_parser_t *
{
report_info_t *info = parser->state->private;
- svn_ra_serf__expand_string(&info->prop_val, &info->prop_val_len,
- data, len, parser->state->pool);
+ svn_stringbuf_appendbytes(info->prop_value, data, len);
}
return SVN_NO_ERROR;
Modified: subversion/branches/inheritable-props/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_ra_serf/util.c?rev=1305667&r1=1305666&r2=1305667&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_ra_serf/util.c Mon Mar 26 23:23:46 2012
@@ -436,11 +436,13 @@ svn_ra_serf__conn_setup(apr_socket_t *so
return status;
}
-serf_bucket_t*
-svn_ra_serf__accept_response(serf_request_t *request,
- serf_bucket_t *stream,
- void *acceptor_baton,
- apr_pool_t *pool)
+
+/* Our default serf response acceptor. */
+static serf_bucket_t *
+accept_response(serf_request_t *request,
+ serf_bucket_t *stream,
+ void *acceptor_baton,
+ apr_pool_t *pool)
{
serf_bucket_t *c;
serf_bucket_alloc_t *bkt_alloc;
@@ -451,7 +453,9 @@ svn_ra_serf__accept_response(serf_reques
return serf_bucket_response_create(c, bkt_alloc);
}
-static serf_bucket_t*
+
+/* Custom response acceptor for HEAD requests. */
+static serf_bucket_t *
accept_head(serf_request_t *request,
serf_bucket_t *stream,
void *acceptor_baton,
@@ -459,8 +463,7 @@ accept_head(serf_request_t *request,
{
serf_bucket_t *response;
- response = svn_ra_serf__accept_response(request, stream, acceptor_baton,
- pool);
+ response = accept_response(request, stream, acceptor_baton, pool);
/* We know we shouldn't get a response body. */
serf_bucket_response_set_head(response);
@@ -630,23 +633,38 @@ apr_status_t svn_ra_serf__handle_client_
}
-svn_error_t *
-svn_ra_serf__setup_serf_req(serf_request_t *request,
- serf_bucket_t **req_bkt,
- serf_bucket_t **ret_hdrs_bkt,
- svn_ra_serf__connection_t *conn,
- const char *method, const char *url,
- serf_bucket_t *body_bkt, const char *content_type)
+/*
+ * Given a REQUEST on connection CONN, construct a request bucket for it,
+ * returning the bucket in *REQ_BKT.
+ *
+ * If HDRS_BKT is not-NULL, it will be set to a headers_bucket that
+ * corresponds to the new request.
+ *
+ * The request will be METHOD at URL.
+ *
+ * If BODY_BKT is not-NULL, it will be sent as the request body.
+ *
+ * If CONTENT_TYPE is not-NULL, it will be sent as the Content-Type header.
+ *
+ * REQUEST_POOL should live for the duration of the request. Serf will
+ * construct this and provide it to the request_setup callback, so we
+ * should just use that one.
+ */
+static svn_error_t *
+setup_serf_req(serf_request_t *request,
+ serf_bucket_t **req_bkt,
+ serf_bucket_t **hdrs_bkt,
+ svn_ra_serf__connection_t *conn,
+ const char *method, const char *url,
+ serf_bucket_t *body_bkt, const char *content_type,
+ apr_pool_t *request_pool,
+ apr_pool_t *scratch_pool)
{
serf_bucket_alloc_t *allocator = serf_request_get_alloc(request);
- serf_bucket_t *hdrs_bkt;
#if SERF_VERSION_AT_LEAST(1, 1, 0)
svn_spillbuf_t *buf;
- /* ### this should be passed */
- apr_pool_t *scratch_pool = conn->session->pool;
-
if (conn->http10 && body_bkt != NULL)
{
/* Ugh. Use HTTP/1.0 to talk to the server because we don't know if
@@ -657,19 +675,18 @@ svn_ra_serf__setup_serf_req(serf_request
then wrap a bucket around that spillbuf. The spillbuf will give
us the Content-Length value. */
SVN_ERR(svn_ra_serf__copy_into_spillbuf(&buf, body_bkt,
- conn->session->pool,
+ request_pool,
scratch_pool));
body_bkt = svn_ra_serf__create_sb_bucket(buf, allocator,
- conn->session->pool,
+ request_pool,
scratch_pool);
}
#endif
/* Create a request bucket. Note that this sucker is kind enough to
add a "Host" header for us. */
- *req_bkt =
- serf_request_bucket_request_create(request, method, url, body_bkt,
- allocator);
+ *req_bkt = serf_request_bucket_request_create(request, method, url,
+ body_bkt, allocator);
/* Set the Content-Length value. This will also trigger an HTTP/1.0
request (rather than the default chunked request). */
@@ -683,25 +700,24 @@ svn_ra_serf__setup_serf_req(serf_request
}
#endif
- hdrs_bkt = serf_bucket_request_get_headers(*req_bkt);
- serf_bucket_headers_setn(hdrs_bkt, "User-Agent", conn->useragent);
+ *hdrs_bkt = serf_bucket_request_get_headers(*req_bkt);
+
+ /* We use serf_bucket_headers_setn() because the string below have a
+ lifetime longer than this bucket. Thus, there is no need to copy
+ the header values. */
+ serf_bucket_headers_setn(*hdrs_bkt, "User-Agent", conn->useragent);
if (content_type)
{
- serf_bucket_headers_setn(hdrs_bkt, "Content-Type", content_type);
+ serf_bucket_headers_setn(*hdrs_bkt, "Content-Type", content_type);
}
/* These headers need to be sent with every request; see issue #3255
("mod_dav_svn does not pass client capabilities to start-commit
hooks") for why. */
- serf_bucket_headers_set(hdrs_bkt, "DAV", SVN_DAV_NS_DAV_SVN_DEPTH);
- serf_bucket_headers_set(hdrs_bkt, "DAV", SVN_DAV_NS_DAV_SVN_MERGEINFO);
- serf_bucket_headers_set(hdrs_bkt, "DAV", SVN_DAV_NS_DAV_SVN_LOG_REVPROPS);
-
- if (ret_hdrs_bkt)
- {
- *ret_hdrs_bkt = hdrs_bkt;
- }
+ serf_bucket_headers_setn(*hdrs_bkt, "DAV", SVN_DAV_NS_DAV_SVN_DEPTH);
+ serf_bucket_headers_setn(*hdrs_bkt, "DAV", SVN_DAV_NS_DAV_SVN_MERGEINFO);
+ serf_bucket_headers_setn(*hdrs_bkt, "DAV", SVN_DAV_NS_DAV_SVN_LOG_REVPROPS);
return SVN_NO_ERROR;
}
@@ -770,11 +786,11 @@ svn_ra_serf__context_run_wait(svn_boolea
*/
static svn_error_t *
start_error(svn_ra_serf__xml_parser_t *parser,
- void *userData,
svn_ra_serf__dav_props_t name,
- const char **attrs)
+ const char **attrs,
+ apr_pool_t *scratch_pool)
{
- svn_ra_serf__server_error_t *ctx = userData;
+ svn_ra_serf__server_error_t *ctx = parser->user_data;
if (!ctx->in_error &&
strcmp(name.namespace, "DAV:") == 0 &&
@@ -812,10 +828,10 @@ start_error(svn_ra_serf__xml_parser_t *p
*/
static svn_error_t *
end_error(svn_ra_serf__xml_parser_t *parser,
- void *userData,
- svn_ra_serf__dav_props_t name)
+ svn_ra_serf__dav_props_t name,
+ apr_pool_t *scratch_pool)
{
- svn_ra_serf__server_error_t *ctx = userData;
+ svn_ra_serf__server_error_t *ctx = parser->user_data;
if (ctx->in_error &&
strcmp(name.namespace, "DAV:") == 0 &&
@@ -850,11 +866,11 @@ end_error(svn_ra_serf__xml_parser_t *par
*/
static svn_error_t *
cdata_error(svn_ra_serf__xml_parser_t *parser,
- void *userData,
const char *data,
- apr_size_t len)
+ apr_size_t len,
+ apr_pool_t *scratch_pool)
{
- svn_ra_serf__server_error_t *ctx = userData;
+ svn_ra_serf__server_error_t *ctx = parser->user_data;
if (ctx->collect_cdata)
{
@@ -1037,11 +1053,11 @@ parse_dav_status(int *status_code_out, s
*/
static svn_error_t *
start_207(svn_ra_serf__xml_parser_t *parser,
- void *userData,
svn_ra_serf__dav_props_t name,
- const char **attrs)
+ const char **attrs,
+ apr_pool_t *scratch_pool)
{
- svn_ra_serf__server_error_t *ctx = userData;
+ svn_ra_serf__server_error_t *ctx = parser->user_data;
if (!ctx->in_error &&
strcmp(name.namespace, "DAV:") == 0 &&
@@ -1072,10 +1088,10 @@ start_207(svn_ra_serf__xml_parser_t *par
*/
static svn_error_t *
end_207(svn_ra_serf__xml_parser_t *parser,
- void *userData,
- svn_ra_serf__dav_props_t name)
+ svn_ra_serf__dav_props_t name,
+ apr_pool_t *scratch_pool)
{
- svn_ra_serf__server_error_t *ctx = userData;
+ svn_ra_serf__server_error_t *ctx = parser->user_data;
if (ctx->in_error &&
strcmp(name.namespace, "DAV:") == 0 &&
@@ -1116,11 +1132,11 @@ end_207(svn_ra_serf__xml_parser_t *parse
*/
static svn_error_t *
cdata_207(svn_ra_serf__xml_parser_t *parser,
- void *userData,
const char *data,
- apr_size_t len)
+ apr_size_t len,
+ apr_pool_t *scratch_pool)
{
- svn_ra_serf__server_error_t *ctx = userData;
+ svn_ra_serf__server_error_t *ctx = parser->user_data;
if (ctx->collect_cdata)
{
@@ -1221,11 +1237,14 @@ svn_ra_serf__handle_multistatus_only(ser
return svn_error_trace(err);
}
+
+/* Conforms to Expat's XML_StartElementHandler */
static void
start_xml(void *userData, const char *raw_name, const char **attrs)
{
svn_ra_serf__xml_parser_t *parser = userData;
svn_ra_serf__dav_props_t name;
+ apr_pool_t *scratch_pool;
if (parser->error)
return;
@@ -1233,31 +1252,43 @@ start_xml(void *userData, const char *ra
if (!parser->state)
svn_ra_serf__xml_push_state(parser, 0);
+ /* ### get a real scratch_pool */
+ scratch_pool = parser->state->pool;
+
svn_ra_serf__define_ns(&parser->state->ns_list, attrs, parser->state->pool);
svn_ra_serf__expand_ns(&name, parser->state->ns_list, raw_name);
- parser->error = parser->start(parser, parser->user_data, name, attrs);
+ parser->error = parser->start(parser, name, attrs, scratch_pool);
}
+
+/* Conforms to Expat's XML_EndElementHandler */
static void
end_xml(void *userData, const char *raw_name)
{
svn_ra_serf__xml_parser_t *parser = userData;
svn_ra_serf__dav_props_t name;
+ apr_pool_t *scratch_pool;
if (parser->error)
return;
+ /* ### get a real scratch_pool */
+ scratch_pool = parser->state->pool;
+
svn_ra_serf__expand_ns(&name, parser->state->ns_list, raw_name);
- parser->error = parser->end(parser, parser->user_data, name);
+ parser->error = parser->end(parser, name, scratch_pool);
}
+
+/* Conforms to Expat's XML_CharacterDataHandler */
static void
cdata_xml(void *userData, const char *data, int len)
{
svn_ra_serf__xml_parser_t *parser = userData;
+ apr_pool_t *scratch_pool;
if (parser->error)
return;
@@ -1265,7 +1296,10 @@ cdata_xml(void *userData, const char *da
if (!parser->state)
svn_ra_serf__xml_push_state(parser, 0);
- parser->error = parser->cdata(parser, parser->user_data, data, len);
+ /* ### get a real scratch_pool */
+ scratch_pool = parser->state->pool;
+
+ parser->error = parser->cdata(parser, data, len, scratch_pool);
}
/* Flip the requisite bits in CTX to indicate that processing of the
@@ -1986,68 +2020,55 @@ handle_response_cb(serf_request_t *reque
return serf_status;
}
-/* If the CTX->setup() callback is non-NULL, invoke it to carry out the
- majority of the serf_request_setup_t implementation. Otherwise, perform
- default setup, with special handling for HEAD requests, and finer-grained
- callbacks invoked (if non-NULL) to produce the request headers and
- body. */
+/* Perform basic request setup, with special handling for HEAD requests,
+ and finer-grained callbacks invoked (if non-NULL) to produce the request
+ headers and body. */
static svn_error_t *
setup_request(serf_request_t *request,
- svn_ra_serf__handler_t *ctx,
- serf_bucket_t **req_bkt,
- serf_response_acceptor_t *acceptor,
- void **acceptor_baton,
- serf_response_handler_t *handler,
- void **handler_baton,
- apr_pool_t *pool)
+ svn_ra_serf__handler_t *ctx,
+ serf_bucket_t **req_bkt,
+ serf_response_acceptor_t *acceptor,
+ void **acceptor_baton,
+ serf_response_handler_t *handler,
+ void **handler_baton,
+ apr_pool_t *request_pool,
+ apr_pool_t *scratch_pool)
{
+ serf_bucket_t *body_bkt;
serf_bucket_t *headers_bkt;
- *acceptor = svn_ra_serf__accept_response;
+ /* Default response acceptor. */
+ *acceptor = accept_response;
*acceptor_baton = ctx->session;
- if (ctx->setup)
+ if (strcmp(ctx->method, "HEAD") == 0)
{
- svn_ra_serf__response_handler_t response_handler;
- void *response_baton;
+ *acceptor = accept_head;
+ }
- SVN_ERR(ctx->setup(request, ctx->setup_baton, req_bkt,
- acceptor, acceptor_baton,
- &response_handler, &response_baton,
- pool));
+ if (ctx->body_delegate)
+ {
+ serf_bucket_alloc_t *bkt_alloc = serf_request_get_alloc(request);
- ctx->response_handler = response_handler;
- ctx->response_baton = response_baton;
+ /* ### should pass the scratch_pool */
+ SVN_ERR(ctx->body_delegate(&body_bkt, ctx->body_delegate_baton,
+ bkt_alloc, request_pool));
}
else
{
- serf_bucket_t *body_bkt;
- serf_bucket_alloc_t *bkt_alloc = serf_request_get_alloc(request);
-
- if (strcmp(ctx->method, "HEAD") == 0)
- {
- *acceptor = accept_head;
- }
-
- if (ctx->body_delegate)
- {
- SVN_ERR(ctx->body_delegate(&body_bkt, ctx->body_delegate_baton,
- bkt_alloc, pool));
- }
- else
- {
- body_bkt = NULL;
- }
+ body_bkt = NULL;
+ }
- SVN_ERR(svn_ra_serf__setup_serf_req(request, req_bkt, &headers_bkt,
- ctx->conn, ctx->method, ctx->path,
- body_bkt, ctx->body_type));
+ SVN_ERR(setup_serf_req(request, req_bkt, &headers_bkt,
+ ctx->conn, ctx->method, ctx->path,
+ body_bkt, ctx->body_type,
+ request_pool, scratch_pool));
- if (ctx->header_delegate)
- {
- SVN_ERR(ctx->header_delegate(headers_bkt, ctx->header_delegate_baton,
- pool));
- }
+ if (ctx->header_delegate)
+ {
+ /* ### should pass the scratch_pool */
+ SVN_ERR(ctx->header_delegate(headers_bkt, ctx->header_delegate_baton,
+ request_pool));
}
*handler = handle_response_cb;
@@ -2072,11 +2093,15 @@ setup_request_cb(serf_request_t *request
svn_ra_serf__handler_t *ctx = setup_baton;
svn_error_t *err;
+ /* ### construct a scratch_pool? serf gives us a pool that will live for
+ ### the duration of the request. */
+ apr_pool_t *scratch_pool = pool;
+
err = setup_request(request, ctx,
req_bkt,
acceptor, acceptor_baton,
handler, handler_baton,
- pool);
+ pool /* request_pool */, scratch_pool);
if (err)
{
Modified: subversion/branches/inheritable-props/subversion/libsvn_ra_serf/xml.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_ra_serf/xml.c?rev=1305667&r1=1305666&r2=1305667&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_ra_serf/xml.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_ra_serf/xml.c Mon Mar 26 23:23:46 2012
@@ -124,34 +124,6 @@ svn_ra_serf__expand_ns(svn_ra_serf__dav_
return;
}
-void
-svn_ra_serf__expand_string(const char **cur, apr_size_t *cur_len,
- const char *new, apr_size_t new_len,
- apr_pool_t *pool)
-{
- if (!*cur)
- {
- *cur = apr_pstrmemdup(pool, new, new_len);
- *cur_len = new_len;
- }
- else
- {
- char *new_cur;
-
- /* append the data we received before. */
- new_cur = apr_palloc(pool, *cur_len + new_len + 1);
-
- memcpy(new_cur, *cur, *cur_len);
- memcpy(new_cur + *cur_len, new, new_len);
-
- /* NULL-term our new string */
- new_cur[*cur_len + new_len] = '\0';
-
- /* update our length */
- *cur_len += new_len;
- *cur = new_cur;
- }
-}
#define XML_HEADER "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
Modified: subversion/branches/inheritable-props/subversion/libsvn_subr/gpg_agent.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_subr/gpg_agent.c?rev=1305667&r1=1305666&r2=1305667&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_subr/gpg_agent.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_subr/gpg_agent.c Mon Mar 26 23:23:46 2012
@@ -413,12 +413,11 @@ simple_gpg_agent_first_creds(void **cred
const char *realmstring,
apr_pool_t *pool)
{
- return svn_auth__simple_first_creds_helper(credentials,
- iter_baton, provider_baton,
- parameters, realmstring,
- password_get_gpg_agent,
- SVN_AUTH__GPG_AGENT_PASSWORD_TYPE,
- pool);
+ return svn_auth__simple_creds_cache_get(credentials, iter_baton,
+ provider_baton, parameters,
+ realmstring, password_get_gpg_agent,
+ SVN_AUTH__GPG_AGENT_PASSWORD_TYPE,
+ pool);
}
@@ -431,12 +430,11 @@ simple_gpg_agent_save_creds(svn_boolean_
const char *realmstring,
apr_pool_t *pool)
{
- return svn_auth__simple_save_creds_helper(saved, credentials,
- provider_baton, parameters,
- realmstring,
- password_set_gpg_agent,
- SVN_AUTH__GPG_AGENT_PASSWORD_TYPE,
- pool);
+ return svn_auth__simple_creds_cache_set(saved, credentials,
+ provider_baton, parameters,
+ realmstring, password_set_gpg_agent,
+ SVN_AUTH__GPG_AGENT_PASSWORD_TYPE,
+ pool);
}
Modified: subversion/branches/inheritable-props/subversion/libsvn_subr/macos_keychain.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_subr/macos_keychain.c?rev=1305667&r1=1305666&r2=1305667&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_subr/macos_keychain.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_subr/macos_keychain.c Mon Mar 26 23:23:46 2012
@@ -160,14 +160,14 @@ keychain_simple_first_creds(void **crede
const char *realmstring,
apr_pool_t *pool)
{
- return svn_auth__simple_first_creds_helper(credentials,
- iter_baton,
- provider_baton,
- parameters,
- realmstring,
- keychain_password_get,
- SVN_AUTH__KEYCHAIN_PASSWORD_TYPE,
- pool);
+ return svn_auth__simple_creds_cache_get(credentials,
+ iter_baton,
+ provider_baton,
+ parameters,
+ realmstring,
+ keychain_password_get,
+ SVN_AUTH__KEYCHAIN_PASSWORD_TYPE,
+ pool);
}
/* Save encrypted credentials to the simple provider's cache. */
@@ -179,13 +179,13 @@ keychain_simple_save_creds(svn_boolean_t
const char *realmstring,
apr_pool_t *pool)
{
- return svn_auth__simple_save_creds_helper(saved, credentials,
- provider_baton,
- parameters,
- realmstring,
- keychain_password_set,
- SVN_AUTH__KEYCHAIN_PASSWORD_TYPE,
- pool);
+ return svn_auth__simple_creds_cache_set(saved, credentials,
+ provider_baton,
+ parameters,
+ realmstring,
+ keychain_password_set,
+ SVN_AUTH__KEYCHAIN_PASSWORD_TYPE,
+ pool);
}
static const svn_auth_provider_t keychain_simple_provider = {
@@ -205,13 +205,12 @@ keychain_ssl_client_cert_pw_first_creds(
const char *realmstring,
apr_pool_t *pool)
{
- return svn_auth__ssl_client_cert_pw_file_first_creds_helper
- (credentials,
- iter_baton, provider_baton,
- parameters, realmstring,
- keychain_password_get,
- SVN_AUTH__KEYCHAIN_PASSWORD_TYPE,
- pool);
+ return svn_auth__ssl_client_cert_pw_cache_get(credentials,
+ iter_baton, provider_baton,
+ parameters, realmstring,
+ keychain_password_get,
+ SVN_AUTH__KEYCHAIN_PASSWORD_TYPE,
+ pool);
}
/* Save encrypted credentials to the ssl client cert password provider's
@@ -224,13 +223,12 @@ keychain_ssl_client_cert_pw_save_creds(s
const char *realmstring,
apr_pool_t *pool)
{
- return svn_auth__ssl_client_cert_pw_file_save_creds_helper
- (saved, credentials,
- provider_baton, parameters,
- realmstring,
- keychain_password_set,
- SVN_AUTH__KEYCHAIN_PASSWORD_TYPE,
- pool);
+ return svn_auth__ssl_client_cert_pw_cache_set(saved, credentials,
+ provider_baton, parameters,
+ realmstring,
+ keychain_password_set,
+ SVN_AUTH__KEYCHAIN_PASSWORD_TYPE,
+ pool);
}
static const svn_auth_provider_t keychain_ssl_client_cert_pw_provider = {
Modified: subversion/branches/inheritable-props/subversion/libsvn_subr/simple_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_subr/simple_providers.c?rev=1305667&r1=1305666&r2=1305667&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_subr/simple_providers.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_subr/simple_providers.c Mon Mar 26 23:23:46 2012
@@ -127,20 +127,16 @@ simple_username_get(const char **usernam
return FALSE;
}
-/* Common implementation for simple_first_creds. Uses PARAMETERS, REALMSTRING
- and the simple auth provider's username and password cache to fill a set of
- CREDENTIALS. PASSWORD_GET is used to obtain the password value.
- PASSTYPE identifies the type of the cached password. CREDENTIALS are
- allocated from POOL. */
+
svn_error_t *
-svn_auth__simple_first_creds_helper(void **credentials,
- void **iter_baton,
- void *provider_baton,
- apr_hash_t *parameters,
- const char *realmstring,
- svn_auth__password_get_t password_get,
- const char *passtype,
- apr_pool_t *pool)
+svn_auth__simple_creds_cache_get(void **credentials,
+ void **iter_baton,
+ void *provider_baton,
+ apr_hash_t *parameters,
+ const char *realmstring,
+ svn_auth__password_get_t password_get,
+ const char *passtype,
+ apr_pool_t *pool)
{
const char *config_dir = apr_hash_get(parameters,
SVN_AUTH_PARAM_CONFIG_DIR,
@@ -307,19 +303,15 @@ svn_auth__simple_first_creds_helper(void
}
-/* Common implementation for simple_save_creds. Uses PARAMETERS and
- REALMSTRING to save a set of CREDENTIALS to the simple auth provider's
- username and password cache. PASSWORD_SET is used to store the password.
- PASSTYPE identifies the type of the cached password. Allocates from POOL. */
svn_error_t *
-svn_auth__simple_save_creds_helper(svn_boolean_t *saved,
- void *credentials,
- void *provider_baton,
- apr_hash_t *parameters,
- const char *realmstring,
- svn_auth__password_set_t password_set,
- const char *passtype,
- apr_pool_t *pool)
+svn_auth__simple_creds_cache_set(svn_boolean_t *saved,
+ void *credentials,
+ void *provider_baton,
+ apr_hash_t *parameters,
+ const char *realmstring,
+ svn_auth__password_set_t password_set,
+ const char *passtype,
+ apr_pool_t *pool)
{
svn_auth_cred_simple_t *creds = credentials;
apr_hash_t *creds_hash = NULL;
@@ -501,14 +493,12 @@ simple_first_creds(void **credentials,
const char *realmstring,
apr_pool_t *pool)
{
- return svn_auth__simple_first_creds_helper(credentials,
- iter_baton,
- provider_baton,
- parameters,
- realmstring,
- svn_auth__simple_password_get,
- SVN_AUTH__SIMPLE_PASSWORD_TYPE,
- pool);
+ return svn_auth__simple_creds_cache_get(credentials, iter_baton,
+ provider_baton, parameters,
+ realmstring,
+ svn_auth__simple_password_get,
+ SVN_AUTH__SIMPLE_PASSWORD_TYPE,
+ pool);
}
/* Save (unencrypted) credentials to the simple provider's cache. */
@@ -520,13 +510,11 @@ simple_save_creds(svn_boolean_t *saved,
const char *realmstring,
apr_pool_t *pool)
{
- return svn_auth__simple_save_creds_helper(saved, credentials,
- provider_baton,
- parameters,
- realmstring,
- svn_auth__simple_password_set,
- SVN_AUTH__SIMPLE_PASSWORD_TYPE,
- pool);
+ return svn_auth__simple_creds_cache_set(saved, credentials, provider_baton,
+ parameters, realmstring,
+ svn_auth__simple_password_set,
+ SVN_AUTH__SIMPLE_PASSWORD_TYPE,
+ pool);
}
static const svn_auth_provider_t simple_provider = {
Modified: subversion/branches/inheritable-props/subversion/libsvn_subr/ssl_client_cert_pw_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_subr/ssl_client_cert_pw_providers.c?rev=1305667&r1=1305666&r2=1305667&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_subr/ssl_client_cert_pw_providers.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_subr/ssl_client_cert_pw_providers.c Mon Mar 26 23:23:46 2012
@@ -104,15 +104,14 @@ svn_auth__ssl_client_cert_pw_set(svn_boo
}
svn_error_t *
-svn_auth__ssl_client_cert_pw_file_first_creds_helper
- (void **credentials_p,
- void **iter_baton,
- void *provider_baton,
- apr_hash_t *parameters,
- const char *realmstring,
- svn_auth__password_get_t passphrase_get,
- const char *passtype,
- apr_pool_t *pool)
+svn_auth__ssl_client_cert_pw_cache_get(void **credentials_p,
+ void **iter_baton,
+ void *provider_baton,
+ apr_hash_t *parameters,
+ const char *realmstring,
+ svn_auth__password_get_t passphrase_get,
+ const char *passtype,
+ apr_pool_t *pool)
{
svn_config_t *cfg = apr_hash_get(parameters,
SVN_AUTH_PARAM_CONFIG_CATEGORY_SERVERS,
@@ -166,15 +165,14 @@ svn_auth__ssl_client_cert_pw_file_first_
svn_error_t *
-svn_auth__ssl_client_cert_pw_file_save_creds_helper
- (svn_boolean_t *saved,
- void *credentials,
- void *provider_baton,
- apr_hash_t *parameters,
- const char *realmstring,
- svn_auth__password_set_t passphrase_set,
- const char *passtype,
- apr_pool_t *pool)
+svn_auth__ssl_client_cert_pw_cache_set(svn_boolean_t *saved,
+ void *credentials,
+ void *provider_baton,
+ apr_hash_t *parameters,
+ const char *realmstring,
+ svn_auth__password_set_t passphrase_set,
+ const char *passtype,
+ apr_pool_t *pool)
{
svn_auth_cred_ssl_client_cert_pw_t *creds = credentials;
apr_hash_t *creds_hash = NULL;
@@ -348,15 +346,12 @@ ssl_client_cert_pw_file_first_credential
const char *realmstring,
apr_pool_t *pool)
{
- return svn_auth__ssl_client_cert_pw_file_first_creds_helper
- (credentials_p,
- iter_baton,
- provider_baton,
- parameters,
- realmstring,
- svn_auth__ssl_client_cert_pw_get,
- SVN_AUTH__SIMPLE_PASSWORD_TYPE,
- pool);
+ return svn_auth__ssl_client_cert_pw_cache_get(credentials_p, iter_baton,
+ provider_baton, parameters,
+ realmstring,
+ svn_auth__ssl_client_cert_pw_get,
+ SVN_AUTH__SIMPLE_PASSWORD_TYPE,
+ pool);
}
@@ -370,14 +365,13 @@ ssl_client_cert_pw_file_save_credentials
const char *realmstring,
apr_pool_t *pool)
{
- return svn_auth__ssl_client_cert_pw_file_save_creds_helper
- (saved, credentials,
- provider_baton,
- parameters,
- realmstring,
- svn_auth__ssl_client_cert_pw_set,
- SVN_AUTH__SIMPLE_PASSWORD_TYPE,
- pool);
+ return svn_auth__ssl_client_cert_pw_cache_set(saved, credentials,
+ provider_baton,
+ parameters,
+ realmstring,
+ svn_auth__ssl_client_cert_pw_set,
+ SVN_AUTH__SIMPLE_PASSWORD_TYPE,
+ pool);
}
Modified: subversion/branches/inheritable-props/subversion/libsvn_subr/win32_crypto.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_subr/win32_crypto.c?rev=1305667&r1=1305666&r2=1305667&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_subr/win32_crypto.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_subr/win32_crypto.c Mon Mar 26 23:23:46 2012
@@ -135,14 +135,14 @@ windows_simple_first_creds(void **creden
const char *realmstring,
apr_pool_t *pool)
{
- return svn_auth__simple_first_creds_helper(credentials,
- iter_baton,
- provider_baton,
- parameters,
- realmstring,
- windows_password_decrypter,
- SVN_AUTH__WINCRYPT_PASSWORD_TYPE,
- pool);
+ return svn_auth__simple_creds_cache_get(credentials,
+ iter_baton,
+ provider_baton,
+ parameters,
+ realmstring,
+ windows_password_decrypter,
+ SVN_AUTH__WINCRYPT_PASSWORD_TYPE,
+ pool);
}
/* Save encrypted credentials to the simple provider's cache. */
@@ -154,13 +154,13 @@ windows_simple_save_creds(svn_boolean_t
const char *realmstring,
apr_pool_t *pool)
{
- return svn_auth__simple_save_creds_helper(saved, credentials,
- provider_baton,
- parameters,
- realmstring,
- windows_password_encrypter,
- SVN_AUTH__WINCRYPT_PASSWORD_TYPE,
- pool);
+ return svn_auth__simple_creds_cache_set(saved, credentials,
+ provider_baton,
+ parameters,
+ realmstring,
+ windows_password_encrypter,
+ SVN_AUTH__WINCRYPT_PASSWORD_TYPE,
+ pool);
}
static const svn_auth_provider_t windows_simple_provider = {
@@ -274,15 +274,10 @@ windows_ssl_client_cert_pw_first_creds(v
const char *realmstring,
apr_pool_t *pool)
{
- return svn_auth__ssl_client_cert_pw_file_first_creds_helper
- (credentials,
- iter_baton,
- provider_baton,
- parameters,
- realmstring,
- windows_ssl_client_cert_pw_decrypter,
- SVN_AUTH__WINCRYPT_PASSWORD_TYPE,
- pool);
+ return svn_auth__ssl_client_cert_pw_cache_get(
+ credentials, iter_baton, provider_baton, parameters, realmstring,
+ windows_ssl_client_cert_pw_decrypter,
+ SVN_AUTH__WINCRYPT_PASSWORD_TYPE, pool);
}
/* Save encrypted credentials to the simple provider's cache. */
@@ -294,15 +289,10 @@ windows_ssl_client_cert_pw_save_creds(sv
const char *realmstring,
apr_pool_t *pool)
{
- return svn_auth__ssl_client_cert_pw_file_save_creds_helper
- (saved,
- credentials,
- provider_baton,
- parameters,
- realmstring,
- windows_ssl_client_cert_pw_encrypter,
- SVN_AUTH__WINCRYPT_PASSWORD_TYPE,
- pool);
+ return svn_auth__ssl_client_cert_pw_cache_set(
+ saved, credentials, provider_baton, parameters, realmstring,
+ windows_ssl_client_cert_pw_encrypter,
+ SVN_AUTH__WINCRYPT_PASSWORD_TYPE, pool);
}
static const svn_auth_provider_t windows_ssl_client_cert_pw_provider = {