From a68460a939d322ffce6fe6838d011ce0f979a7c2 Mon Sep 17 00:00:00 2001 From: "relyea%netscape.com" Date: Tue, 16 May 2000 17:28:31 +0000 Subject: Only output caching if we turn tracing on. --- security/nss/lib/ssl/sslsnce.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'security') diff --git a/security/nss/lib/ssl/sslsnce.c b/security/nss/lib/ssl/sslsnce.c index 84f3a99f0..bf58c954d 100644 --- a/security/nss/lib/ssl/sslsnce.c +++ b/security/nss/lib/ssl/sslsnce.c @@ -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) { -- cgit v1.2.1