]> jfr.im git - irc/atheme/libmowgli-2.git/commitdiff
Add mowgli_log_bootstrap()
authorPatrick McFarland <redacted>
Tue, 5 Feb 2013 04:51:20 +0000 (23:51 -0500)
committerPatrick McFarland <redacted>
Tue, 5 Feb 2013 04:51:20 +0000 (23:51 -0500)
src/libmowgli/core/bootstrap.c
src/libmowgli/core/logger.c

index 9e13b9915ec79bb9022523d94c23c28741d57571..fb47201f293d779e813eedfad99edecbb3c84d29 100644 (file)
@@ -23,6 +23,8 @@
 
 #include "mowgli.h"
 
+extern void mowgli_log_bootstrap(void);
+
 MOWGLI_BOOTSTRAP_FUNC(mowgli_bootstrap_real)
 {
        static bool bootstrapped = 0;
@@ -37,6 +39,7 @@ MOWGLI_BOOTSTRAP_FUNC(mowgli_bootstrap_real)
 #endif
 
        /* initial bootstrap */
+       mowgli_log_bootstrap();
        mowgli_node_bootstrap();
        mowgli_queue_bootstrap();
        mowgli_argstack_bootstrap();
index d8edbea215055a0ed89052363a588b1932dc3c97..ece58b6c997acf9c91a01ee70220d94f0c930ef1 100644 (file)
@@ -23,8 +23,8 @@
 
 #include "mowgli.h"
 
-char buf1[65535];
-char buf2[65535];
+char buf1[65536];
+char buf2[65536];
 
 void mowgli_log_cb_default(const char *buf) {
        fprintf(stderr, "%s\n", buf);
@@ -32,6 +32,11 @@ void mowgli_log_cb_default(const char *buf) {
 
 static mowgli_log_cb_t mowgli_log_cb = mowgli_log_cb_default;
 
+void mowgli_log_bootstrap() {
+       buf1[65535] = 0;
+       buf2[65535] = 0;
+}
+
 /* TODO: remove next time there is a LIB_MAJOR bump */
 void mowgli_log_real(const char *file, int line, const char *func,
                const char *fmt, ...) {