OSSP CVS Repository

ossp - Difference in ossp-pkg/l2/l2_ch_syslog.c versions 1.10 and 1.11
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/l2/l2_ch_syslog.c 1.10 -> 1.11

--- 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)

CVSTrac 2.0.1