From 6338a4933bbb5f4e44fd304adc1bbb11c096394a Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Mon, 2 Nov 2015 12:30:18 -0800 Subject: Fixed another closure bug. Updated debug levels --- netcon/NetconUtilities.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'netcon/NetconUtilities.cpp') diff --git a/netcon/NetconUtilities.cpp b/netcon/NetconUtilities.cpp index 81d4f6f5..c7ebfb5b 100644 --- a/netcon/NetconUtilities.cpp +++ b/netcon/NetconUtilities.cpp @@ -40,15 +40,28 @@ #ifndef _NETCON_UTILITIES_CPP #define _NETCON_UTILITIES_CPP +#define DEBUG_LEVEL 3 + namespace ZeroTier { + void dwr(int level, char *fmt, ... ) + { + if(level > DEBUG_LEVEL) + return; + va_list ap; + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + fflush(stderr); + va_end(ap); + } + void dwr(char *fmt, ... ) { va_list ap; va_start(ap, fmt); vfprintf(stderr, fmt, ap); fflush(stderr); - va_end(ap); + va_end(ap); } void clearscreen() -- cgit v1.2.3