Skip to content

Commit

Permalink
Move vtc.panic to STRANDS
Browse files Browse the repository at this point in the history
  • Loading branch information
Dridi committed Jul 3, 2019
1 parent bbf53b8 commit 8790bec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/libvmod_vtc/vmod.vcc
Expand Up @@ -70,7 +70,7 @@ $Function IP no_ip()

Returns a null IP address, not even a bogo_ip.

$Function VOID panic(STRING_LIST)
$Function VOID panic(STRANDS)

It can be useful to crash the child process in order to test the robustness
of a VMOD.
Expand Down
7 changes: 2 additions & 5 deletions lib/libvmod_vtc/vmod_vtc.c
Expand Up @@ -99,16 +99,13 @@ vmod_no_ip(VRT_CTX)
/*--------------------------------------------------------------------*/

VCL_VOID v_matchproto_(td_vtc_panic)
vmod_panic(VRT_CTX, const char *str, ...)
vmod_panic(VRT_CTX, VCL_STRANDS str)
{
va_list ap;
const char *b;

CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);

va_start(ap, str);
b = VRT_String(ctx->ws, "PANIC: ", str, ap);
va_end(ap);
b = VRT_StrandsWS(ctx->ws, "PANIC:", str);
VAS_Fail("VCL", "", 0, b, VAS_VCL);
}

Expand Down

0 comments on commit 8790bec

Please sign in to comment.