[master] 5ab1629 req->task members must be set in case we get onto the waitinglist

Nils Goroll nils.goroll at uplex.de
Mon May 2 13:19:04 CEST 2016


commit 5ab1629df0a9871376d95b4b37e1519c67931237
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Thu Apr 28 12:51:50 2016 +0200

    req->task members must be set in case we get onto the waitinglist
    
    Fixes #1928

diff --git a/bin/varnishd/http1/cache_http1_fsm.c b/bin/varnishd/http1/cache_http1_fsm.c
index 0174604..216dedf 100644
--- a/bin/varnishd/http1/cache_http1_fsm.c
+++ b/bin/varnishd/http1/cache_http1_fsm.c
@@ -392,13 +392,15 @@ HTTP1_Session(struct worker *wrk, struct req *req)
 			http1_setstate(sp, H1PROC);
 		} else if (st == H1PROC) {
 			req->transport = &HTTP1_transport;
+			req->task.func = http1_req;
+			req->task.priv = req;
 			if (CNT_Request(wrk, req) == REQ_FSM_DISEMBARK) {
-				req->task.func = http1_req;
-				req->task.priv = req;
 				http1_setstate(sp, H1BUSY);
 				return;
 			}
 			req->transport = NULL;
+			req->task.func = NULL;
+			req->task.priv = NULL;
 			http1_setstate(sp, H1CLEANUP);
 		} else if (st == H1CLEANUP) {
 			if (Req_Cleanup(sp, wrk, req))



More information about the varnish-commit mailing list