Only output caching if we turn tracing on.

This commit is contained in:
relyea%netscape.com 2000-05-16 17:28:31 +00:00
parent edb6ec0cf5
commit 9da670d592

View File

@ -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) {