--- l2_ch_file.c 2001/09/04 15:41:17 1.10
+++ l2_ch_file.c 2001/09/04 15:44:48 1.11
@@ -88,7 +88,6 @@
static int hook_open(l2_context_t *ctx, l2_channel_t *ch)
{
l2_ch_file_t *cfg;
- l2_channel_t *downstream;
int mode;
/* parameter checks */
@@ -104,11 +103,6 @@
if ((cfg->fd = open(cfg->path, mode, cfg->perm)) == -1)
return L2_ERROR;
- /* optionally open downstream channel, too */
- if ((downstream = l2_channel_downstream(ch)) != NULL)
- if (l2_channel_open(downstream) == L2_ERROR)
- return L2_ERROR;
-
return L2_OK;
}
@@ -117,7 +111,6 @@
const char *buf, size_t buf_size)
{
l2_ch_file_t *cfg;
- l2_channel_t *downstream;
/* parameter checks */
if ((cfg = (l2_ch_file_t *)ctx->vp) == NULL)
@@ -129,26 +122,14 @@
if (write(cfg->fd, buf, buf_size) == -1)
return L2_ERROR;
- /* optionally write to downstream channel, too */
- if ((downstream = l2_channel_downstream(ch)) != NULL)
- if (l2_channel_write(downstream, buf, buf_size) == L2_ERROR)
- return L2_ERROR;
-
return L2_OK;
}
/* flush channel */
static int hook_flush(l2_context_t *ctx, l2_channel_t *ch)
{
- l2_channel_t *downstream;
-
/* NOP for this channel, because Unix I/O files are unbuffered! */
- /* optionally flush downstream channel, too */
- if ((downstream = l2_channel_downstream(ch)) != NULL)
- if (l2_channel_flush(downstream) == L2_ERROR)
- return L2_ERROR;
-
return L2_OK;
}
@@ -156,12 +137,6 @@
static int hook_close(l2_context_t *ctx, l2_channel_t *ch)
{
l2_ch_file_t *cfg;
- l2_channel_t *downstream;
-
- /* optionally close downstream channel, too */
- if ((downstream = l2_channel_downstream(ch)) != NULL)
- if (l2_channel_close(downstream) == L2_ERROR)
- return L2_ERROR;
/* parameter checks */
if ((cfg = (l2_ch_file_t *)ctx->vp) == NULL)
|