OSSP CVS Repository

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

ossp-pkg/l2/l2_ch_buffer.c 1.17 -> 1.18

--- l2_ch_buffer.c       2001/09/06 16:10:05     1.17
+++ l2_ch_buffer.c       2001/09/11 11:59:59     1.18
@@ -175,6 +175,8 @@
 static l2_result_t hook_destroy(l2_context_t *ctx, l2_channel_t *ch)
 {
     l2_ch_buffer_t *cfg = (l2_ch_buffer_t *)ctx->vp;
+    l2_channel_t *downstream = l2_channel_downstream(ch);
+    l2_result_t rv;
 
     /* if not already closed, close channel buffer now */
     if (cfg->buf != NULL) {
@@ -185,6 +187,10 @@
     /* destroy channel configuration */
     free(cfg);
 
+    /* optionally destroy downstream channel, too */
+    if ((rv = l2_channel_destroy(downstream)) != L2_OK)
+        return rv;
+
     return L2_OK;
 }
 

CVSTrac 2.0.1