# --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../jabberd2/jabberd2-fix-debug-disabled.patch # Copyright (C) 2012 The OpenSDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- SDE-COPYRIGHT-NOTE-END --- From 41884d9919f3b00e44809207ec4f8e7658f606a7 Mon Sep 17 00:00:00 2001 From: Tomasz Sterna Date: Sat, 5 May 2012 15:56:24 +0200 Subject: [PATCH] Fixed build with debug disabled --- util/log.c | 11 +++++++---- util/util.h | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/util/log.c b/util/log.c index edf3919..06835da 100644 --- a/util/log.c +++ b/util/log.c @@ -223,12 +223,12 @@ void set_debug_flag(int v) debug_flag = v; } -int set_debug_log_from_config(config_t c) +void set_debug_log_from_config(config_t c) { return set_debug_file(config_get_one(c, "log.debug", 0)); -}; +} -JABBERD2_API int set_debug_file(const char *filename) +JABBERD2_API void set_debug_file(const char *filename) { // Close debug output file but not stderr if (debug_log_target != 0 && @@ -255,7 +255,7 @@ JABBERD2_API int set_debug_file(const char *filename) // set stderr debug_log_target = stderr; } -}; +} #else /* DEBUG */ void debug_log(const char *file, int line, const char *msgfmt, ...) @@ -263,4 +263,7 @@ void debug_log(const char *file, int line, const char *msgfmt, ...) void set_debug_flag(int v) { } + +void set_debug_log_from_config(config_t c) +{ } #endif diff --git a/util/util.h b/util/util.h index 7d3a9da..802e25c 100644 --- a/util/util.h +++ b/util/util.h @@ -414,9 +414,9 @@ struct _jqueue_node_st { JABBERD2_API int get_debug_flag(void); JABBERD2_API void set_debug_flag(int v); JABBERD2_API void debug_log(const char *file, int line, const char *msgfmt, ...); -JABBERD2_API int set_debug_file(const char *filename); +JABBERD2_API void set_debug_file(const char *filename); -JABBERD2_API int set_debug_log_from_config(config_t c); +JABBERD2_API void set_debug_log_from_config(config_t c); #define ZONE __FILE__,__LINE__ #define MAX_DEBUG 8192 -- 1.7.10