OSSP CVS Repository

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

ossp-pkg/l2/l2_channel.c 1.9 -> 1.10

--- l2_channel.c 2001/09/03 11:50:25     1.9
+++ l2_channel.c 2001/09/03 13:43:33     1.10
@@ -52,20 +52,20 @@
     return ch;
 }
 
-l2_channel_t *l2_channel_stack(l2_channel_t *ch1, l2_channel_t *ch2)
+l2_result_t l2_channel_stack(l2_channel_t *ch, l2_channel_t *chTop)
 {
-    if (ch1 == NULL || ch2 == NULL)
-        return NULL;
-    if (   ch1->state != L2_CHSTATE_CREATED 
-        || ch2->state != L2_CHSTATE_CREATED)
-        return NULL;
-    ch1->downstream = ch2;
-    return ch1;
+    if (ch == NULL || chTop == NULL)
+        return L2_ERROR;
+    if (   ch->state    != L2_CHSTATE_CREATED
+        || chTop->state != L2_CHSTATE_CREATED)
+        return L2_ERROR;
+    chTop->downstream = ch;
+    return L2_OK;
 }
 
-int l2_channel_configure(l2_channel_t *ch, const char *fmt, ...)
+l2_result_t l2_channel_configure(l2_channel_t *ch, const char *fmt, ...)
 {
-    int rv;
+    l2_result_t rv;
     va_list ap;
 
     if (ch == NULL || fmt == NULL)
@@ -78,7 +78,7 @@
     return rv;
 }
 
-int l2_channel_open(l2_channel_t *ch)
+l2_result_t l2_channel_open(l2_channel_t *ch)
 {
     l2_result_t rv;
 
@@ -96,7 +96,7 @@
     return rv;
 }
 
-int l2_channel_write(l2_channel_t *ch, const char *buf, size_t bufsize)
+l2_result_t l2_channel_write(l2_channel_t *ch, const char *buf, size_t bufsize)
 {
     l2_result_t rv;
 
@@ -116,7 +116,7 @@
     return rv;
 }
 
-int l2_channel_flush(l2_channel_t *ch)
+l2_result_t l2_channel_flush(l2_channel_t *ch)
 {
     l2_result_t rv;
 
@@ -132,7 +132,7 @@
     return rv;
 }
 
-int l2_channel_close(l2_channel_t *ch)
+l2_result_t l2_channel_close(l2_channel_t *ch)
 {
     l2_result_t rv;
 
@@ -150,7 +150,7 @@
     return rv;
 }
 
-int l2_channel_destroy(l2_channel_t *ch)
+l2_result_t l2_channel_destroy(l2_channel_t *ch)
 {
     l2_result_t rv;
 
@@ -169,7 +169,7 @@
     return rv;
 }
 
-int l2_channel_setparams(l2_param_t pa[], const char *fmt, va_list ap)
+l2_result_t l2_channel_setparams(l2_param_t pa[], const char *fmt, va_list ap)
 {
     const char *cpB, *cpE;
     const char *cpC, *cpG;

CVSTrac 2.0.1