[master] 6044905 Introduce a HTC_S_JUNK return value
Poul-Henning Kamp
phk at FreeBSD.org
Tue Apr 7 10:13:42 CEST 2015
commit 60449056585ee3656426aa9624c398987deee65a
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Apr 7 08:13:28 2015 +0000
Introduce a HTC_S_JUNK return value
diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index 4eda863..e2207c0 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -1000,6 +1000,7 @@ task_func_t SES_Proto_Sess;
task_func_t SES_Proto_Req;
enum htc_status_e {
+ HTC_S_JUNK = -5,
HTC_S_CLOSE = -4,
HTC_S_TIMEOUT = -3,
HTC_S_OVERFLOW = -2,
diff --git a/bin/varnishd/cache/cache_session.c b/bin/varnishd/cache/cache_session.c
index c5f321b..33cad6b 100644
--- a/bin/varnishd/cache/cache_session.c
+++ b/bin/varnishd/cache/cache_session.c
@@ -259,6 +259,10 @@ SES_RxReq(const struct worker *wrk, struct req *req, htc_complete_f *func)
return (HTC_S_OVERFLOW);
}
hs = func(req->htc);
+ if (hs == HTC_S_JUNK) {
+ WS_ReleaseP(req->htc->ws, req->htc->rxbuf_b);
+ return (HTC_S_JUNK);
+ }
if (hs == HTC_S_COMPLETE) {
/* Got it, run with it */
if (isnan(req->t_first))
More information about the varnish-commit
mailing list