Commit 7bbc60f7 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Untangle cnt_error() entrance criteria:

We should never come in with a busyobj or obj.

Always allocate obj from Transient storage.
parent 0d03ebb6
...@@ -488,13 +488,10 @@ cnt_error(struct sess *sp, struct worker *wrk, struct req *req) ...@@ -488,13 +488,10 @@ cnt_error(struct sess *sp, struct worker *wrk, struct req *req)
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
CHECK_OBJ_NOTNULL(req, REQ_MAGIC); CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
if (req->obj == NULL) { AZ(req->objcore);
HSH_Prealloc(sp); AZ(req->obj);
AZ(wrk->busyobj); AZ(wrk->busyobj);
wrk->busyobj = VBO_GetBusyObj(wrk); wrk->busyobj = VBO_GetBusyObj(wrk);
req->obj = STV_NewObject(wrk, NULL, cache_param->http_resp_size,
(uint16_t)cache_param->http_max_hdr);
if (req->obj == NULL)
req->obj = STV_NewObject(wrk, TRANSIENT_STORAGE, req->obj = STV_NewObject(wrk, TRANSIENT_STORAGE,
cache_param->http_resp_size, cache_param->http_resp_size,
(uint16_t)cache_param->http_max_hdr); (uint16_t)cache_param->http_max_hdr);
...@@ -506,14 +503,10 @@ cnt_error(struct sess *sp, struct worker *wrk, struct req *req) ...@@ -506,14 +503,10 @@ cnt_error(struct sess *sp, struct worker *wrk, struct req *req)
sp->step = STP_DONE; sp->step = STP_DONE;
return(0); return(0);
} }
AN(req->obj); CHECK_OBJ_NOTNULL(req->obj, OBJECT_MAGIC);
req->obj->xid = req->xid; req->obj->xid = req->xid;
req->obj->exp.entered = sp->t_req; req->obj->exp.entered = sp->t_req;
} else {
CHECK_OBJ_NOTNULL(wrk->busyobj, BUSYOBJ_MAGIC);
/* XXX: Null the headers ? */
}
CHECK_OBJ_NOTNULL(req->obj, OBJECT_MAGIC);
h = req->obj->http; h = req->obj->http;
if (req->err_code < 100 || req->err_code > 999) if (req->err_code < 100 || req->err_code > 999)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment