From df7932a36438eda2efb95118997a763e3cc97c26 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 14 Feb 2008 14:09:18 +0000 Subject: [PATCH] DEVEL15-windows-osilog-savestring-20080214 LICENSE MIT When osi_Log is disabled, osi_LogSaveString will no longer copy the provided string into the circular log buffer. This saves a huge amount of time. (cherry picked from commit 00bada9c5eb803c13a6b930e79684a470cf94278) --- src/WINNT/client_osi/osilog.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/WINNT/client_osi/osilog.c b/src/WINNT/client_osi/osilog.c index c9604bfb8..91c2f6ebe 100644 --- a/src/WINNT/client_osi/osilog.c +++ b/src/WINNT/client_osi/osilog.c @@ -273,6 +273,10 @@ char *osi_LogSaveString(osi_log_t *logp, char *s) { char *saveplace; + if (!logp) return s; + + if (!logp->enabled) s; + if (s == NULL) return NULL; thrd_EnterCrit(&logp->cs); -- 2.39.5