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

Re: [PATCH] Fix lock timeout values handling in libsvn_ra_serf

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Thu, 20 Mar 2014 11:17:16 +0000

Sergey Raevskiy <sergey.raevskiy_at_visualsvn.com> writes:

> Index: subversion/libsvn_ra_serf/lock.c
> ===================================================================
> --- subversion/libsvn_ra_serf/lock.c (revision 1579559)
> +++ subversion/libsvn_ra_serf/lock.c (working copy)
> @@ -150,9 +150,17 @@ locks_closed(svn_ra_serf__xml_estate_t *xes,
> {
> if (strcmp(cdata->data, "Infinite") == 0)
> lock_ctx->lock->expiration_date = 0;
> + else if (strncmp(cdata->data, "Second-", 7) == 0)
> + {
> + int time_offset;
> +
> + SVN_ERR(svn_cstring_atoi(&time_offset, cdata->data + 7));
> + lock_ctx->lock->expiration_date = lock_ctx->lock->creation_date
> + + apr_time_from_sec(time_offset);
> + }
> else
> - SVN_ERR(svn_time_from_cstring(&lock_ctx->lock->creation_date,
> - cdata->data, lock_ctx->pool));
> + return svn_error_create(SVN_ERR_RA_DAV_RESPONSE_HEADER_BADNESS,
> + NULL, _("Invalid timeout value"));
> }
> else if (leaving_state == HREF)
> {

We need the same fix in get_lock.c as well. I'm looking at a regression
test.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Received on 2014-03-20 12:17:55 CET

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.