From d6fa5fd93942d7128d1566b6d05c23a43ae50975 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 24 Jun 2008 18:12:02 +0000 Subject: [PATCH] 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 --- varnish-cache/bin/varnishd/cache_vrt_re.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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); } -- 2.39.5