Commit affcc1eb authored by Geoff Simmons's avatar Geoff Simmons

.check_call() emits the Notice message as documented for illegal calls.

parent 477d5567
......@@ -313,7 +313,7 @@ vmod_set_check_call(VRT_CTX, struct VPFX(selector_set) *set, VCL_INT n,
if (!check_added(ctx, set, idx, SUB, "check_call", "subroutine", 0))
return (0);
if ((err = VRT_check_call(ctx, set->table[idx]->sub)) != NULL) {
VNOTICE(ctx, "%s", err);
VNOTICE(ctx, "%s.check_call(): %s", set->vcl_name, err);
return (0);
}
......
......@@ -802,7 +802,7 @@ logexpect l1 -v v1 -d 0 -g vxid -q "VCL_Error" {
logexpect l2 -v v1 -d 0 -g vxid -q "Notice" {
expect 0 * Begin req
expect * = Notice {^vmod_selector: Dynamic call to "sub foo\{\}" not allowed from here$}
expect * = Notice {^vmod_selector: s\.check_call\(\): Dynamic call to "sub foo\{\}" not allowed from here$}
expect 0 = ReqHeader {^Check: false$}
expect * = End
} -start
......@@ -851,7 +851,7 @@ logexpect l1 -v v1 -d 0 -g vxid -q "VCL_Error" {
logexpect l2 -v v1 -d 0 -g vxid -q "Notice" {
expect 0 * Begin req
expect * = Notice {^vmod_selector: Recursive dynamic call to "sub foo\{\}"$}
expect * = Notice {^vmod_selector: s\.check_call\(\): Recursive dynamic call to "sub foo\{\}"$}
expect 0 = ReqHeader {^Check: false$}
expect * = End
} -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