Commit 7fc2003e authored by Nils Goroll's avatar Nils Goroll

fix and test parameters on stack

parent 787af448
......@@ -395,9 +395,11 @@ vmod_cluster_resolve(VRT_CTX, VCL_BACKEND dir)
(pr) = (pl) = cluster_task_param_l( \
(ctx), (vc), (pr)->nblack + 1); \
} else { \
(pr) = (pl) = alloca(param_sz(pl, (pr)->nblack + 1)); \
INIT_OBJ((pl), VMOD_CLUSTER_CLUSTER_PARAM_MAGIC); \
} \
(pl) = alloca(param_sz((pr), (pr)->nblack + 1)); \
memcpy((pl), (pr), param_sz((pr), (pr)->nblack)); \
(pl)->spcblack = (pr)->nblack + 1; \
(pr) = (pl); \
} \
} while (0)
VCL_BACKEND
......
......@@ -12,14 +12,14 @@ varnish v1 -vcl {
new rr = directors.round_robin();
rr.add_backend(s1);
rr.add_backend(s2);
new cl = cluster.cluster(rr.backend(), deny=s2, real=s3);
new cl = cluster.cluster(rr.backend());
}
sub vcl_recv {
return (synth(200));
}
sub vcl_synth {
set resp.http.b1 = cl.backend(resolve=NOW);
set resp.http.b2 = cl.backend(resolve=NOW);
set resp.http.b1 = cl.backend(resolve=NOW, deny=s2, real=s3);
set resp.http.b2 = cl.backend(resolve=NOW, deny=s2, real=s3);
}
} -start
......
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