Commit ed418ea0 authored by Nils Goroll's avatar Nils Goroll

modernize enum handling

parent 60d3263b
...@@ -131,13 +131,13 @@ static struct ws * ...@@ -131,13 +131,13 @@ static struct ws *
vtc_ws_find(VRT_CTX, VCL_ENUM which) vtc_ws_find(VRT_CTX, VCL_ENUM which)
{ {
if (!strcmp(which, "client")) if (which == VENUM(client))
return (ctx->ws); return (ctx->ws);
if (!strcmp(which, "backend")) if (which == VENUM(backend))
return (ctx->bo->ws); return (ctx->bo->ws);
if (!strcmp(which, "session")) if (which == VENUM(session))
return (ctx->req->sp->ws); return (ctx->req->sp->ws);
if (!strcmp(which, "thread")) if (which == VENUM(thread))
return (ctx->req->wrk->aws); return (ctx->req->wrk->aws);
WRONG("vtc_ws_find Illegal enum"); WRONG("vtc_ws_find Illegal enum");
} }
......
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