diff options
author | relyea%netscape.com <devnull@localhost> | 2000-05-16 17:28:31 +0000 |
---|---|---|
committer | relyea%netscape.com <devnull@localhost> | 2000-05-16 17:28:31 +0000 |
commit | a68460a939d322ffce6fe6838d011ce0f979a7c2 (patch) | |
tree | 3cf75d4dc53d951a418ef5eeb7a13cf2866e93b9 | |
parent | d88667a4362601742325ce4d3e8d6297fc15ba67 (diff) | |
download | nss-hg-a68460a939d322ffce6fe6838d011ce0f979a7c2.tar.gz |
Only output caching if we turn tracing on.
-rw-r--r-- | security/nss/lib/ssl/sslsnce.c | 18 |
1 files changed, 12 insertions, 6 deletions
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) { |