From: Alan T. DeKok Date: Mon, 5 Jan 2015 16:56:22 +0000 (-0500) Subject: Initialize xlats before reading the config X-Git-Tag: release_3_0_7~346 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad5b5f9535b04597719bc1e62506260f7eaa9782;p=thirdparty%2Ffreeradius-server.git Initialize xlats before reading the config --- diff --git a/src/main/unittest.c b/src/main/unittest.c index 906ac6d2f25..486bc5e44f2 100644 --- a/src/main/unittest.c +++ b/src/main/unittest.c @@ -388,7 +388,6 @@ static void print_packet(FILE *fp, RADIUS_PACKET *packet) #include - /* * %{poke:sql.foo=bar} */ @@ -623,6 +622,11 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } + if (xlat_register("poke", xlat_poke, NULL, NULL) < 0) { + rcode = EXIT_FAILURE; + goto finish; + } + /* Read the configuration files, BEFORE doing anything else. */ if (main_config_init() < 0) { rcode = EXIT_FAILURE; @@ -637,11 +641,6 @@ int main(int argc, char *argv[]) goto finish; } - if (xlat_register("poke", xlat_poke, NULL, NULL) < 0) { - rcode = EXIT_FAILURE; - goto finish; - } - fr_state_init(); /* Set the panic action (if required) */