From: phk Date: Tue, 24 Jun 2008 18:12:02 +0000 (+0000) Subject: Ooops, last commit got one file more than intended. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6fa5fd93942d7128d1566b6d05c23a43ae50975;p=varnish Ooops, last commit got one file more than intended. Here is the fix for the regsub() issue: Don't release negative bytecounts, we have the special variant WS_ReleaseP() just for jobs like this. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2792 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_vrt_re.c b/varnish-cache/bin/varnishd/cache_vrt_re.c index a6884d39..4f1d8cce 100644 --- a/varnish-cache/bin/varnishd/cache_vrt_re.c +++ b/varnish-cache/bin/varnishd/cache_vrt_re.c @@ -124,7 +124,6 @@ VRT_regsub(const struct sess *sp, int all, const char *str, void *re, const char if (i == REG_NOMATCH) return(str); -VSL(SLT_Debug, sp->fd, "REGSUB {"); u = WS_Reserve(sp->http->ws, 0); res.e = res.b = b0 = sp->http->ws->f; res.e += u; @@ -164,7 +163,6 @@ VSL(SLT_Debug, sp->fd, "REGSUB {"); return (str); } Tcheck(res); - WS_Release(sp->http->ws, b0 - res.b); -VSL(SLT_Debug, sp->fd, "REGSUB }"); + WS_ReleaseP(sp->http->ws, res.b); return (b0); }