OSSP CVS Repository

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

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

--- l2_ch_prefix.c       2001/09/06 16:10:05     1.10
+++ l2_ch_prefix.c       2001/09/11 11:59:59     1.11
@@ -119,6 +119,8 @@
 static l2_result_t hook_destroy(l2_context_t *ctx, l2_channel_t *ch)
 {
     l2_ch_prefix_t *cfg = (l2_ch_prefix_t *)ctx->vp;
+    l2_channel_t *downstream = l2_channel_downstream(ch);
+    l2_result_t rv;
 
     /* free prefix structure */
     if (cfg->timefmt != NULL)
@@ -127,6 +129,10 @@
         free(cfg->timezone);
     free(cfg);
 
+    /* optionally destroy downstream channel, too */
+    if ((rv = l2_channel_destroy(downstream)) != L2_OK)
+        return rv;
+
     return L2_OK;
 }
 

CVSTrac 2.0.1