diff options
author | Stef Walter <stef@memberwebs.com> | 2004-09-03 01:34:14 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-09-03 01:34:14 +0000 |
commit | 4375d1aefd0f484a50c5d6773d71ac62bc01e44c (patch) | |
tree | 1121bf24d3a2b9add0bd03b44c3a33647eb910fe /common/stringx.c | |
parent | 6e142a434645a27b6fa07bbfd2d06228d8fc4fd9 (diff) |
Configuration file for clamsmtp
Diffstat (limited to 'common/stringx.c')
-rw-r--r-- | common/stringx.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/common/stringx.c b/common/stringx.c index 8b6a816..c0a46bc 100644 --- a/common/stringx.c +++ b/common/stringx.c @@ -67,14 +67,14 @@ static void vmessage(clamsmtp_context_t* ctx, int level, int err, char* m; int e = errno; - if(g_daemonized) + if(g_state.daemonized) { if(level >= LOG_DEBUG) return; } else { - if(g_debuglevel < level) + if(g_state.debug_level < level) return; } @@ -102,7 +102,7 @@ static void vmessage(clamsmtp_context_t* ctx, int level, int err, } /* Either to syslog or stderr */ - if(g_daemonized) + if(g_state.daemonized) vsyslog(level, msg, ap); else vwarnx(msg, ap); @@ -244,16 +244,16 @@ void plock() #endif #ifdef _DEBUG - r = pthread_mutex_trylock(&g_mutex); + r = pthread_mutex_trylock(&(g_state.mutex)); if(r == EBUSY) { wait = 1; message(NULL, LOG_DEBUG, "thread will block: %d", pthread_self()); - r = pthread_mutex_lock(&g_mutex); + r = pthread_mutex_lock(&(g_state.mutex)); } #else - r = pthread_mutex_lock(&g_mutex); + r = pthread_mutex_lock(&(g_state.mutex)); #endif @@ -273,7 +273,7 @@ void plock() void punlock() { - int r = pthread_mutex_unlock(&g_mutex); + int r = pthread_mutex_unlock(&(g_state.mutex)); if(r != 0) { errno = r; |