--- l2_ch_socket.c 2001/09/04 15:41:17 1.8
+++ l2_ch_socket.c 2001/09/04 15:44:48 1.9
@@ -141,7 +141,6 @@
struct hostent *pHostentry;
struct sockaddr_in IP4Sockaddr;
struct sockaddr_in6 IP6Sockaddr;
- l2_channel_t *downstream;
/* parameter checks */
if ((cfg = (l2_ch_socket_t *)ctx->vp) == NULL)
@@ -188,11 +187,6 @@
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;
}
@@ -201,7 +195,6 @@
const char *buf, size_t buf_size)
{
l2_ch_socket_t *cfg;
- l2_channel_t *downstream;
/* parameter checks */
if ((cfg = (l2_ch_socket_t *)ctx->vp) == NULL)
@@ -213,26 +206,14 @@
if (send(cfg->iSocket, buf, buf_size, 0) == -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 sockets 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;
}
@@ -240,12 +221,6 @@
static int hook_close(l2_context_t *ctx, l2_channel_t *ch)
{
l2_ch_socket_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_socket_t *)ctx->vp) == NULL)
|