From 9da670d592557f98e38396a0a7fef285b8e6d372 Mon Sep 17 00:00:00 2001 From: "relyea%netscape.com" Date: Tue, 16 May 2000 17:28:31 +0000 Subject: [PATCH] Only output caching if we turn tracing on. --- security/nss/lib/ssl/sslsnce.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/security/nss/lib/ssl/sslsnce.c b/security/nss/lib/ssl/sslsnce.c index 411801bbb68f..a1916c0ae80b 100644 --- a/security/nss/lib/ssl/sslsnce.c +++ b/security/nss/lib/ssl/sslsnce.c @@ -32,7 +32,7 @@ * may use your version of this file under either the MPL or the * GPL. * - * $Id: sslsnce.c,v 1.1 2000/03/31 19:36:20 relyea%netscape.com Exp $ + * $Id: sslsnce.c,v 1.2 2000/05/16 17:28:31 relyea%netscape.com Exp $ */ /* Note: ssl_FreeSID() in sslnonce.c gets used for both client and server @@ -426,9 +426,11 @@ _getServerCacheLock(int fd, short type, PRUint32 offset, PRUint32 size) lock.l_len = 128; #ifdef TRACE - fprintf(stderr, "%d: %s lock, offset %8x, size %4d\n", myPid, + if (ssl_trace) { + fprintf(stderr, "%d: %s lock, offset %8x, size %4d\n", myPid, (type == F_RDLCK) ? "read " : "write", offset, size); - fflush(stderr); + fflush(stderr); + } #endif result = fcntl(fd, F_SETLKW, &lock); if (result == -1) { @@ -437,9 +439,11 @@ _getServerCacheLock(int fd, short type, PRUint32 offset, PRUint32 size) return SECFailure; } #ifdef TRACE - fprintf(stderr, "%d: got lock, offset %8x, size %4d\n", + if (ssl_trace) { + fprintf(stderr, "%d: got lock, offset %8x, size %4d\n", myPid, offset, size); - fflush(stderr); + fflush(stderr); + } #endif return SECSuccess; } @@ -519,9 +523,11 @@ releaseServerCacheLock(int fd, PRUint32 offset, PRUint32 size) lock.l_len = 128; #ifdef TRACE - fprintf(stderr, "%d: unlock, offset %8x, size %4d\n", + if (ssl_trace) { + fprintf(stderr, "%d: unlock, offset %8x, size %4d\n", myPid, offset, size); - fflush(stderr); + fflush(stderr); + } #endif result = fcntl(fd, F_SETLK, &lock); if (result == -1) {