summaryrefslogtreecommitdiffstats
path: root/filter/f-util.c
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>1999-03-29 22:21:28 +0200
committerPavel Machek <pavel@ucw.cz>1999-03-29 22:21:28 +0200
commitba92164871f65bb9adcfa66b901d1a7b86697a86 (patch)
treeed1c8fea5b94ea0c2ef23eb0129c82a5be3f99ac /filter/f-util.c
parent5bc512aa3a0d3e4ca378fff3316b75c131f17637 (diff)
downloadbird-ba92164871f65bb9adcfa66b901d1a7b86697a86.tar
bird-ba92164871f65bb9adcfa66b901d1a7b86697a86.zip
Update of filters towards new interface.
Diffstat (limited to 'filter/f-util.c')
-rw-r--r--filter/f-util.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/filter/f-util.c b/filter/f-util.c
index 1f757ff..ee7ea2d 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);
}