...
 
Commits (2)
......@@ -7,7 +7,7 @@
.. role:: ref(emphasis)
=======
vmod_re
VMOD re
=======
-------------------------------------------------------------------------
......
......@@ -76,20 +76,13 @@ errmsg(VRT_CTX, const char *fmt, ...)
{
va_list args;
AZ(ctx->method & VCL_MET_TASK_H);
va_start(args, fmt);
if (ctx->vsl)
VSLbv(ctx->vsl, SLT_VCL_Error, fmt, args);
else
VSLv(SLT_VCL_Error, 0, fmt, args);
va_end(args);
if (ctx->method == VCL_MET_INIT) {
AN(ctx->msg);
va_start(args, fmt);
VSB_vprintf(ctx->msg, fmt, args);
va_end(args);
VRT_handling(ctx, VCL_RET_FAIL);
}
}
VCL_VOID
......@@ -108,19 +101,19 @@ vmod_regex__init(VRT_CTX, struct vmod_re_regex **rep, const char *vcl_name,
AN(pattern);
if (limit < 1) {
errmsg(ctx, "vmod re: invalid limit %d in %s constructor",
VRT_fail(ctx, "vmod re: invalid limit %d in %s constructor",
limit, vcl_name);
return;
}
if (limit_recursion < 1) {
errmsg(ctx, "vmod re: invalid limit_recursion %d "
VRT_fail(ctx, "vmod re: invalid limit_recursion %d "
"in %s constructor", limit_recursion, vcl_name);
return;
}
if ((vre = VRE_compile(pattern, 0, &error, &erroffset)) == NULL) {
errmsg(ctx, "vmod re: error compiling regex \"%s\" in %s "
VRT_fail(ctx, "vmod re: error compiling regex \"%s\" in %s "
"constructor: %s (at offset %d)", pattern, vcl_name,
error, erroffset);
return;
......