diff options
author | laforge <laforge> | 2005-11-20 13:20:57 +0000 |
---|---|---|
committer | laforge <laforge> | 2005-11-20 13:20:57 +0000 |
commit | e6459a06dbc4057ec1680c76075bc12c1774d385 (patch) | |
tree | 455096d3fac90b900e0e45c767f72a69f5b1bf59 /src | |
parent | 3913a9084585dc691270d2faa9677132cf96c80f (diff) |
use bitmask instead of enum for input/output data type
Diffstat (limited to 'src')
-rw-r--r-- | src/ulogd.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ulogd.c b/src/ulogd.c index 4ae6470..614d965 100644 --- a/src/ulogd.c +++ b/src/ulogd.c @@ -415,7 +415,7 @@ create_stack_resolve_keys(struct ulogd_pluginstance_stack *stack) if (i == 1) { /* first round: output plugin */ - if (pi_cur->plugin->output.type != ULOGD_DTYPE_SINK) { + if (!(pi_cur->plugin->output.type & ULOGD_DTYPE_SINK)) { ulogd_log(ULOGD_ERROR, "last plugin in stack " "has to be output plugin\n"); return -EINVAL; @@ -425,7 +425,8 @@ create_stack_resolve_keys(struct ulogd_pluginstance_stack *stack) if (&pi_prev->list == &stack->list) { /* this is the last one in the stack */ - if (pi_cur->plugin->input.type != ULOGD_DTYPE_SOURCE) { + if (!(pi_cur->plugin->input.type + & ULOGD_DTYPE_SOURCE)) { ulogd_log(ULOGD_ERROR, "first plugin in stack " "has to be source plugin\n"); return -EINVAL; @@ -435,8 +436,8 @@ create_stack_resolve_keys(struct ulogd_pluginstance_stack *stack) int j; /* not the last one in the stack */ - if (pi_cur->plugin->input.type != - pi_prev->plugin->output.type) { + if (!(pi_cur->plugin->input.type & + pi_prev->plugin->output.type)) { ulogd_log(ULOGD_ERROR, "type mismatch between " "%s and %s in stack\n", pi_cur->plugin->name, |