OSSP CVS Repository

ossp - Difference in ossp-pkg/l2/l2_p.h versions 1.34 and 1.35
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/l2/l2_p.h 1.34 -> 1.35

--- l2_p.h       2003/01/06 11:41:52     1.34
+++ l2_p.h       2003/11/06 15:31:47     1.35
@@ -73,7 +73,9 @@
         cu(value)
 
 /* some hard-coded sizes :-( */
-#define L2_MAX_MSGSIZE         4096
+#define L2_MAX_OUTSIZE          4098 /* this value is for compatiblity with previous versions of L2 */
+#define L2_MAX_MSGSIZE          L2_MAX_OUTSIZE - 2 /* leave room for CR/LF although OSSP/UNIX use LF only */
+#define L2_MSG_BUFSIZE          L2_MAX_OUTSIZE + 1 /* reserve space for convenient trailing NUL */
 #define L2_MAX_FORMATTERS       128
 #define L2_MAX_HANDLERS         128
 #define L2_BROKEN_TIMER          -1
@@ -112,7 +114,7 @@
     int                   interval;
     l2_formatter_entry_t  formatters[L2_MAX_FORMATTERS];
     l2_handler_t         *handlers[L2_MAX_HANDLERS];
-    char                  message[L2_MAX_MSGSIZE];
+    char                  message[L2_MSG_BUFSIZE];
     char                  szError[1024];
     char                  szErrorInfo[512];
     l2_result_t           rvErrorInfo;

CVSTrac 2.0.1