From ba92164871f65bb9adcfa66b901d1a7b86697a86 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Mon, 29 Mar 1999 20:21:28 +0000 Subject: Update of filters towards new interface. --- filter/f-util.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'filter/f-util.c') diff --git a/filter/f-util.c b/filter/f-util.c index 1f757ff4..ee7ea2de 100644 --- a/filter/f-util.c +++ b/filter/f-util.c @@ -22,7 +22,7 @@ #include "conf/conf.h" #include "filter/filter.h" -struct f_inst *autoexec_func = NULL; +struct f_inst *startup_func = NULL; #define runtime(x) do { \ log( L_ERR, x ); \ @@ -71,7 +71,7 @@ interpret(struct f_inst *what) switch (res.type = v2.type) { case T_VOID: runtime( "Can not assign void values" ); case T_INT: - if (sym->class != SYM_VARIABLE_INT) + if (sym->class != (SYM_VARIABLE | T_INT)) runtime( "Variable of bad type" ); sym->aux = v2.val.i; break; @@ -163,6 +163,9 @@ f_run(struct filter *filter, struct rte *rtein, struct rte **rteout) void filters_postconfig(void) { - if (autoexec_func) - interpret(autoexec_func); + printf( "Launching startup function..." ); + if (startup_func) + interpret(startup_func); + printf( "done\n" ); + exit(0); } -- cgit v1.2.3