ensure we always have 256bytes net data size, excluding 4 bytes headroom
authorHarald Welte <laforge@gnumonks.org>
Sun, 28 Feb 2010 16:53:43 +0000 (17:53 +0100)
committerHarald Welte <laforge@gnumonks.org>
Sun, 28 Feb 2010 16:53:43 +0000 (17:53 +0100)
src/target/firmware/comm/msgb.c
src/target/firmware/include/comm/sercomm_cons.h

index 51f00ff..499060c 100644 (file)
@@ -35,7 +35,7 @@ void *tall_msgb_ctx;
 
 #ifdef NO_TALLOC
 /* This is a poor mans static allocator for msgb objects */
-#define MSGB_DATA_SIZE 256
+#define MSGB_DATA_SIZE 256+4
 #define MSGB_NUM       16
 struct supermsg {
        uint8_t allocated;
index 9682a99..11f6654 100644 (file)
@@ -2,7 +2,7 @@
 #define _SERCOMM_CONS_H
 
 /* how large buffers do we allocate? */
-#define SERCOMM_CONS_ALLOC     (256-4)
+#define SERCOMM_CONS_ALLOC     256
 
 int sercomm_puts(const char *s);
 int sercomm_putchar(int c);