OSSP CVS Repository

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

ossp-pkg/l2/l2_test.c 1.30 -> 1.31

--- l2_test.c    2001/10/04 13:35:47     1.30
+++ l2_test.c    2001/10/04 14:58:29     1.31
@@ -70,6 +70,9 @@
 #ifdef WITH_SOCKET
     l2_channel_t *chSock;
 #endif
+#ifdef WITH_IRC
+    l2_channel_t *chIrc;
+#endif
 #ifdef WITH_SMTP
     l2_channel_t *chSmtp;
 #endif
@@ -157,6 +160,21 @@
         die("failed to attach channel pipe into stream");
 #endif /* Pipe */
 
+#ifdef WITH_IRC
+    /* Atenzione! Before testing IRC start the IRC server. */
+    if ((chIrc = l2_channel_create(&l2_handler_irc)) == NULL)   /* IRC */
+        die("failed to create IRC channel");
+
+    if (l2_channel_configure(chIrc) != L2_OK)
+        die("failed to configure IRC channel");
+
+    if (l2_channel_open(chIrc) != L2_OK)
+        die("failed to open IRC channel");
+
+    if (l2_stream_channel(st, chIrc, L2_LEVEL_UPTO(L2_LEVEL_WARNING), L2_LEVEL_NONE) != L2_OK)
+        die("failed to attach channel IRC into stream");
+#endif /* IRC */
+
 #ifdef WITH_SOCKET
     /* Atenzione! Before doing any socket testing, make sure you have a valid */
     /* end point listening, or else you will only get an error message when   */

CVSTrac 2.0.1