[master] 010ef99 Use the new-ish enum type for req-fsm returns
Poul-Henning Kamp
phk at varnish-cache.org
Sat Apr 6 09:11:58 CEST 2013
commit 010ef9936ea9971c0ba5c8d68602295fa27d2efb
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Sat Apr 6 07:10:03 2013 +0000
Use the new-ish enum type for req-fsm returns
diff --git a/bin/varnishd/cache/cache_esi_deliver.c b/bin/varnishd/cache/cache_esi_deliver.c
index 8586090..d5cf9e6 100644
--- a/bin/varnishd/cache/cache_esi_deliver.c
+++ b/bin/varnishd/cache/cache_esi_deliver.c
@@ -47,7 +47,7 @@ ved_include(struct req *preq, const char *src, const char *host)
struct worker *wrk;
struct req *req;
char *wrk_ws_wm;
- int i;
+ enum req_fsm_nxt s;
wrk = preq->wrk;
@@ -104,12 +104,12 @@ ved_include(struct req *preq, const char *src, const char *host)
while (1) {
req->wrk = wrk;
- i = CNT_Request(wrk, req);
- if (i == 1)
+ s = CNT_Request(wrk, req);
+ if (s == REQ_FSM_DONE)
break;
DSL(DBG_WAITINGLIST, req->vsl->wid,
- "loop waiting for ESI (%d)", i);
- assert(i == 2);
+ "loop waiting for ESI (%d)", (int)s);
+ assert(s == REQ_FSM_DISEMBARK);
AZ(req->wrk);
(void)usleep(10000);
}
More information about the varnish-commit
mailing list