ossp-pkg/l2/l2_ch_filter.c 1.10 -> 1.11
--- l2_ch_filter.c 2001/09/28 14:28:41 1.10
+++ l2_ch_filter.c 2001/11/03 22:51:36 1.11
@@ -100,8 +100,6 @@
l2_level_t level, const char *buf, size_t buf_size)
{
l2_ch_filter_t *cfg = (l2_ch_filter_t *)ctx->vp;
- l2_channel_t *downstream = l2_channel_downstream(ch);
- l2_result_t rv;
int bPass, iCheck;
bPass = TRUE;
@@ -117,23 +115,12 @@
bPass = !bPass;
}
- /* write to downstream channel */
- if (bPass)
- if ((rv = l2_channel_write(downstream, level, buf, buf_size)) != L2_OK)
- return rv;
-
- return L2_OK;
+ return (bPass ? L2_OK_PASS : L2_OK);
}
static l2_result_t hook_destroy(l2_context_t *ctx, l2_channel_t *ch)
{
l2_ch_filter_t *cfg = (l2_ch_filter_t *)ctx->vp;
- l2_channel_t *downstream = l2_channel_downstream(ch);
- l2_result_t rv;
-
- /* destroy downstream channel */
- if ((rv = l2_channel_destroy(downstream)) != L2_OK)
- return rv;
/* destroy channel configuration */
if (cfg->szRegex != NULL)
@@ -143,7 +130,7 @@
if (cfg->pcreExtra != NULL)
free(cfg->pcreExtra);
- return L2_OK;
+ return L2_OK_PASS;
}
l2_handler_t l2_handler_filter = {
|
|