aboutsummaryrefslogtreecommitdiff
path: root/src/ccapi
diff options
context:
space:
mode:
authorBen Kaduk <kaduk@mit.edu>2012-08-23 12:38:57 -0400
committerTom Yu <tlyu@mit.edu>2012-08-29 19:17:18 -0400
commitd6a17136ac0ed42ddaba73d18b39cd8f3cce0c63 (patch)
tree17ac38947c30ebfc1baf66d5999684fe1cabbb0f /src/ccapi
parentd98dfa39eeed34dd44f883b38d454de6885b6fc0 (diff)
downloadkrb5-d6a17136ac0ed42ddaba73d18b39cd8f3cce0c63.zip
krb5-d6a17136ac0ed42ddaba73d18b39cd8f3cce0c63.tar.gz
krb5-d6a17136ac0ed42ddaba73d18b39cd8f3cce0c63.tar.bz2
Do not emit debug printfs under NODEBUG
These printfs spew to the console when command-line utilities such as 'klist' and 'aklog' are run, reducing usability. These printfs can also cause application hangs. On a multiprocessor machine, when PuTTY and the ccapiserver are running on different CPUs, PuTTY appears to deadlock with three concurrent threads inside cci_debug_printf(). (cherry picked from commit 932866ad41edf830123bdfef927f1314f3100be9) ticket: 7342 version_fixed: 1.10.4 status: resolved
Diffstat (limited to 'src/ccapi')
-rw-r--r--src/ccapi/common/win/cci_os_debugging.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ccapi/common/win/cci_os_debugging.c b/src/ccapi/common/win/cci_os_debugging.c
index de31c7c..597ac85 100644
--- a/src/ccapi/common/win/cci_os_debugging.c
+++ b/src/ccapi/common/win/cci_os_debugging.c
@@ -32,7 +32,9 @@
/* ------------------------------------------------------------------------ */
void cci_os_debug_vprintf (const char *in_format, va_list in_args) {
+#ifdef DEBUG
printf ( "%s %ld ", timestamp(), GetCurrentThreadId() );
vprintf ( in_format, in_args );
printf ( "\n" );
+#endif
}