]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Do not emit debug printfs under NODEBUG
authorBen Kaduk <kaduk@mit.edu>
Thu, 23 Aug 2012 16:38:57 +0000 (12:38 -0400)
committerTom Yu <tlyu@mit.edu>
Wed, 29 Aug 2012 23:17:18 +0000 (19:17 -0400)
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

src/ccapi/common/win/cci_os_debugging.c

index de31c7c39701b83a46cf83960fda37faf4cb660d..597ac8560534e448ce0649ea31a778b41b024606 100644 (file)
@@ -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
     }