Patch: Statslog() only worked when LDAP_DEBUG && LDAP_SYSLOG (ITS#2215) ================ Written by Hallvard B. Furuseth and placed into the public domain. This software is not subject to any license of the University of Oslo. ================ This patch makes Statslog() work if only one of LDAP_DEBUG and LDAP_SYSLOG is #defined. Hallvard B. Furuseth , Nov 2002. diff -u -2 -r1.373 slap.h --- servers/slapd/slap.h 10 Nov 2002 18:48:36 -0000 1.373 +++ servers/slapd/slap.h 29 Nov 2002 08:00:24 -0000 @@ -1774,4 +1774,17 @@ (arg2), (arg3) ); \ } while (0) +#elif defined(LDAP_DEBUG) +#define Statslog( level, fmt, connid, opid, arg1, arg2, arg3 ) \ + do { \ + if ( ldap_debug & (level) ) \ + fprintf( stderr, (fmt), (connid), (opid), (arg1), (arg2), (arg3) );\ + } while (0) +#elif defined(LDAP_SYSLOG) +#define Statslog( level, fmt, connid, opid, arg1, arg2, arg3 ) \ + do { \ + if ( ldap_syslog & (level) ) \ + syslog( ldap_syslog_level, (fmt), (connid), (opid), (arg1), \ + (arg2), (arg3) ); \ + } while (0) #else #define Statslog( level, fmt, connid, opid, arg1, arg2, arg3 )