Skip to content

Commit

Permalink
Precompile existence checks, too.
Browse files Browse the repository at this point in the history
if ("%{expr: 1 + 2}") ...
  • Loading branch information
alandekok committed Mar 21, 2014
1 parent 4e0a2ca commit 97bee73
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/modcall.c
Expand Up @@ -2552,6 +2552,13 @@ static bool pass2_callback(UNUSED void *ctx, fr_cond_t *c)
{
value_pair_map_t *map;

if ((c->type == COND_TYPE_EXISTS) &&
(c->data.vpt->type == VPT_TYPE_XLAT)) {
if (!pass2_xlat_compile(c->ci, c->data.vpt)) {
return false;
}
}

/*
* Maps have a paircompare fixup applied to them.
* Others get ignored.
Expand All @@ -2561,6 +2568,7 @@ static bool pass2_callback(UNUSED void *ctx, fr_cond_t *c)
map = c->data.map;
goto check_paircmp;
}

return true;
}

Expand Down

0 comments on commit 97bee73

Please sign in to comment.