Index: ossp-pkg/l2/l2_ch_file.c RCS File: /v/ossp/cvs/ossp-pkg/l2/l2_ch_file.c,v rcsdiff -q -kk '-r1.10' '-r1.11' -u '/v/ossp/cvs/ossp-pkg/l2/l2_ch_file.c,v' 2>/dev/null --- 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) Index: ossp-pkg/l2/l2_ch_socket.c RCS File: /v/ossp/cvs/ossp-pkg/l2/l2_ch_socket.c,v rcsdiff -q -kk '-r1.8' '-r1.9' -u '/v/ossp/cvs/ossp-pkg/l2/l2_ch_socket.c,v' 2>/dev/null --- 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) Index: ossp-pkg/l2/l2_ch_syslog.c RCS File: /v/ossp/cvs/ossp-pkg/l2/l2_ch_syslog.c,v rcsdiff -q -kk '-r1.10' '-r1.11' -u '/v/ossp/cvs/ossp-pkg/l2/l2_ch_syslog.c,v' 2>/dev/null --- l2_ch_syslog.c 2001/09/04 15:41:17 1.10 +++ l2_ch_syslog.c 2001/09/04 15:44:48 1.11 @@ -90,7 +90,6 @@ static int hook_open(l2_context_t *ctx, l2_channel_t *ch) { l2_ch_syslog_t *cfg; - l2_channel_t *downstream; /* parameter checks */ if ((cfg = (l2_ch_syslog_t *)ctx->vp) == NULL) @@ -100,11 +99,6 @@ openlog(cfg->pszIdent, cfg->iLogopt, cfg->iFacility); setlogmask(cfg->iMaskpri); - /* 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; } @@ -113,7 +107,6 @@ const char *buf, size_t buf_size) { l2_ch_syslog_t *cfg; - l2_channel_t *downstream; /* parameter checks */ if ((cfg = (l2_ch_syslog_t *)ctx->vp) == NULL) @@ -122,26 +115,14 @@ /* write message to channel syslog */ syslog(cfg->iPriority, buf); - /* 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; - /* Noop for this channel, because syslog entries 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; } @@ -149,12 +130,6 @@ static int hook_close(l2_context_t *ctx, l2_channel_t *ch) { l2_ch_syslog_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_syslog_t *)ctx->vp) == NULL)