diff options
Diffstat (limited to 'worker/debug.c')
-rw-r--r-- | worker/debug.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/worker/debug.c b/worker/debug.c index 6c65342..7253f41 100644 --- a/worker/debug.c +++ b/worker/debug.c @@ -4,16 +4,21 @@ #include <stdarg.h> #include <stdlib.h> -int debug_level = 3; +int debug_level = 5; void debug_fn(const char *format, ...) { va_list ap; char *s = NULL; + int ret; va_start(ap, format); - vasprintf(&s, format, ap); + ret=vasprintf(&s, format, ap); va_end(ap); + if (ret==-1) { + fprintf(stderr, "DEBUG_FN: vasprintf failed!!!\n"); + return; + } /*write(state.fd, s, strlen(s)); */ fprintf(stderr, s); |