OSSP CVS Repository

ossp - Check-in [993]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 993
Date: 2001-Sep-13 18:19:06 (local)
2001-Sep-13 16:19:06 (UTC)
User:ms
Branch:
Comment: Added debug infrastructure, assertions, fixed one bug.
Tickets:
Inspections:
Files:
ossp-pkg/l2/aclocal.m4      1.5 -> 1.6     1 inserted, 0 deleted
ossp-pkg/l2/l2_ch_socket.c      1.26 -> 1.27     1 inserted, 0 deleted
ossp-pkg/l2/l2_sockmon.c      1.6 -> 1.7     3 inserted, 5 deleted
ossp-pkg/l2/l2_test.c      1.19 -> 1.20     1 inserted, 1 deleted

ossp-pkg/l2/aclocal.m4 1.5 -> 1.6

--- aclocal.m4   2001/09/13 13:57:37     1.5
+++ aclocal.m4   2001/09/13 16:19:06     1.6
@@ -139,6 +139,7 @@
         *-pipe* ) ;;
               * ) AC_COMPILER_OPTION(pipe, -pipe, -pipe, CFLAGS="$CFLAGS -pipe") ;;
     esac
+    AC_COMPILER_OPTION(defdbg, -DDEBUG, -DDEBUG, CFLAGS="$CFLAGS -DDEBUG")
     AC_COMPILER_OPTION(ggdb3, -ggdb3, -ggdb3, CFLAGS="$CFLAGS -ggdb3")
     CFLAGS="$CFLAGS -pedantic"
     CFLAGS="$CFLAGS -Wall"


ossp-pkg/l2/l2_ch_socket.c 1.26 -> 1.27

--- l2_ch_socket.c       2001/09/13 12:19:45     1.26
+++ l2_ch_socket.c       2001/09/13 16:19:06     1.27
@@ -53,6 +53,7 @@
     const char      *pszIndex     = NULL;    /* To index IPv6 validity */
     char            *pszNextfield = "";      /* For IPv6 address trans */
 
+    ASSERT(pvMemref);
     if (iFamily == AF_INET) {
         if (inet_aton(pszAddress, &IP4Addr)) {
             memcpy(pvMemref, &IP4Addr, sizeof(struct in_addr));


ossp-pkg/l2/l2_sockmon.c 1.6 -> 1.7

--- l2_sockmon.c 2001/09/10 06:43:10     1.6
+++ l2_sockmon.c 2001/09/13 16:19:06     1.7
@@ -33,6 +33,8 @@
 #include <stdio.h>
 #include <errno.h>
 
+#include "l2.h"
+
 #define BACKLOG 1024    /* max # pending connections */
 #define BUFFSIZ 256     /* max string size           */
 
@@ -41,8 +43,7 @@
     int  i        = 0;
     char *pszTemp = NULL;
 
-/*    ASSERT(pszIn);*/
-/*    ASSERT(*pszIn);*/
+    ASSERT(pszIn);
 
     if ((pszTemp = (char *)strdup(pszIn)) == NULL)
         return NULL;
@@ -60,8 +61,6 @@
     char pszBuf[BUFFSIZ];
     int  cc;
 
-/*    ASSERT(iSock);*/
-
     while (1) { /* Exits when read finishes */
         cc = read(iSock, pszBuf, sizeof (pszBuf));
         if (cc == -1) {
@@ -96,7 +95,6 @@
     int                 iTrans,   cc;
     socklen_t           faddrlen;
 
-/*    ASSERT(iPort);*/
     /* Set up an IPv4 TCP socket to listen on for connections. */
     if (iFamily == AF_INET6)
     {


ossp-pkg/l2/l2_test.c 1.19 -> 1.20

--- l2_test.c    2001/09/12 13:50:46     1.19
+++ l2_test.c    2001/09/13 16:19:06     1.20
@@ -100,7 +100,7 @@
     if (l2_channel_open(chSock) != L2_OK)
         die("failed to open socket channel");
 
-    if (l2_stream_channel(st, chSock, L2_LEVEL_UPTO(L2_LEVEL_WARNING)) != L2_OK)
+    if (l2_stream_channel(st, chSock, L2_LEVEL_UPTO(L2_LEVEL_WARNING), L2_LEVEL_NONE) != L2_OK)
         die("failed to attach first channel into stream");
 #endif
 

CVSTrac 2.0.1