Commit 86032715 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Reference the correct transition in VRT_synth()

parent b8efd99a
...@@ -59,23 +59,26 @@ const void * const vrt_magic_string_unset = &vrt_magic_string_unset; ...@@ -59,23 +59,26 @@ const void * const vrt_magic_string_unset = &vrt_magic_string_unset;
VCL_VOID VCL_VOID
VRT_synth(VRT_CTX, VCL_INT code, VCL_STRING reason) VRT_synth(VRT_CTX, VCL_INT code, VCL_STRING reason)
{ {
const char *ret;
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC); CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
assert(ctx->req != NULL || ctx->bo != NULL); assert(ctx->req != NULL || ctx->bo != NULL);
ret = ctx->req == NULL ? "error" : "synth";
if (code < 0) { if (code < 0) {
VRT_fail(ctx, "return(synth()) status code (%jd) is negative", VRT_fail(ctx, "return(%s()) status code (%jd) is negative",
(intmax_t)code); ret, (intmax_t)code);
return; return;
} }
if (code > 65535) { if (code > 65535) {
VRT_fail(ctx, "return(synth()) status code (%jd) > 65535", VRT_fail(ctx, "return(%s()) status code (%jd) > 65535",
(intmax_t)code); ret, (intmax_t)code);
return; return;
} }
if ((code % 1000) < 100) { if ((code % 1000) < 100) {
VRT_fail(ctx, VRT_fail(ctx,
"illegal return(synth()) status code (%jd) (..0##)", "illegal return(%s()) status code (%jd) (..0##)",
(intmax_t)code); ret, (intmax_t)code);
return; return;
} }
......
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