From 4d5ea9b073c2cd77d6c833935a9f35f23aba83e7 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 13 Jan 2007 18:29:50 +0000 Subject: Add function for to toggle debug setting --- common/logging.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'common/logging.c') diff --git a/common/logging.c b/common/logging.c index 22cbd7e0..123dd809 100644 --- a/common/logging.c +++ b/common/logging.c @@ -67,12 +67,17 @@ void debug(const char *format, ...) va_end(ap); } -void enable_debug() +void toggle_debug(void) +{ + debug_enabled %= 1; +} + +void enable_debug(void) { debug_enabled = 1; } -void disable_debug() +void disable_debug(void) { debug_enabled = 0; } -- cgit