Commit a1e3ed99 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Apply the "alexandrian solution" to cache_center.c and split the

state engine into two separate state engines, one for session
and one for requests.

Next comes the cleanup of all the bits and pieces...
parent 7d9ca7de
......@@ -736,7 +736,8 @@ void VBO_DerefBusyObj(struct worker *wrk, struct busyobj **busyobj);
void VBO_Free(struct busyobj **vbo);
/* cache_center.c [CNT] */
void CNT_Session(struct sess *sp);
int CNT_Request(struct req *);
void CNT_Session(struct sess *);
void CNT_Init(void);
/* cache_cli.c [CLI] */
......
This diff is collapsed.
......@@ -49,6 +49,7 @@ ved_include(struct req *req, const char *src, const char *host)
char *sp_ws_wm;
char *wrk_ws_wm;
unsigned sxid, res_mode;
int i;
wrk = req->sp->wrk;
......@@ -94,9 +95,12 @@ ved_include(struct req *req, const char *src, const char *host)
sxid = req->xid;
while (1) {
req->sp->wrk = wrk;
CNT_Session(req->sp);
if (req->sp->step == STP_DONE)
i = CNT_Request(req);
if (req->sp->step == STP_DONE) {
assert(i == 1);
break;
}
assert(i == 2);
AZ(req->sp->wrk);
DSL(0x20, SLT_Debug, req->sp->vsl_id, "loop waiting for ESI");
(void)usleep(10000);
......
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