From 4c189ec3b488d7fb57966cce23ceb20dfa7a4cae Mon Sep 17 00:00:00 2001 From: LawrenceK Date: Thu, 20 Dec 2012 09:08:14 +0000 Subject: update/fix some debug log calls and add the test of XRDP_DEBUG to make files so controlled by the autoconf option --enable-xrdpdebug --- freerdp1/Makefile.am | 10 +++++++++- freerdp1/xrdp-freerdp.c | 7 ++++++- 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'freerdp1') diff --git a/freerdp1/Makefile.am b/freerdp1/Makefile.am index 494e5c04..d1d49440 100644 --- a/freerdp1/Makefile.am +++ b/freerdp1/Makefile.am @@ -1,10 +1,18 @@ EXTRA_DIST = xrdp-freerdp.h +EXTRA_DEFINES = + +if XRDP_DEBUG +EXTRA_DEFINES += -DXRDP_DEBUG +else +EXTRA_DEFINES += -DXRDP_NODEBUG +endif AM_CFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ -DXRDP_SBIN_PATH=\"${sbindir}\" \ -DXRDP_SHARE_PATH=\"${datadir}/xrdp\" \ - -DXRDP_PID_PATH=\"${localstatedir}/run\" + -DXRDP_PID_PATH=\"${localstatedir}/run\" \ + $(EXTRA_DEFINES) INCLUDES = \ -I$(top_srcdir)/common \ diff --git a/freerdp1/xrdp-freerdp.c b/freerdp1/xrdp-freerdp.c index a44ca627..f50e22fa 100644 --- a/freerdp1/xrdp-freerdp.c +++ b/freerdp1/xrdp-freerdp.c @@ -21,7 +21,12 @@ #include "xrdp-color.h" #include "xrdp_rail.h" -#define LOG_LEVEL 1 +#ifdef XRDP_DEBUG +#define LOG_LEVEL 99 +#else +#define LOG_LEVEL 0 +#endif + #define LLOG(_level, _args) \ do { if (_level < LOG_LEVEL) { g_write _args ; } } while (0) #define LLOGLN(_level, _args) \ -- cgit v1.2.1