projects
/
NeonServV5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'development'
[NeonServV5.git]
/
src
/
log.c
diff --git
a/src/log.c
b/src/log.c
index 6e1ba878e04dabe53776ecb35186bbd691a5dc23..44d63df1d6dbad73890dee3cf3e74ba7ab8ff177 100644
(file)
--- a/
src/log.c
+++ b/
src/log.c
@@
-31,6
+31,9
@@
static void load_log_targets();
static void unload_log_targets();
static int reload_log_targets(int init);
static void unload_log_targets();
static int reload_log_targets(int init);
+#ifdef HAVE_THREADS
+static pthread_mutex_t log_sync;
+#endif
#define LOG_TARGET_TYPE_FILE 1
#define LOG_TARGET_TYPE_STDOUT 2
#define LOG_TARGET_TYPE_FILE 1
#define LOG_TARGET_TYPE_STDOUT 2
@@
-138,7
+141,7
@@
static void write_log(const char *module, const int section, const char *line, i
if(!(target->section & section))
continue;
if(target->type == LOG_TARGET_TYPE_IRC) {
if(!(target->section & section))
continue;
if(target->type == LOG_TARGET_TYPE_IRC) {
- if(section == LOG_IRCRAW ||
(!stricmp(module, "iohandler") && section == LOG_DEBUG
))
+ if(section == LOG_IRCRAW ||
!stricmp(module, "iohandler"
))
continue; //endless loop ;)
struct ChanNode *channel = getChanByName(target->target.channel);
struct ClientSocket *client;
continue; //endless loop ;)
struct ChanNode *channel = getChanByName(target->target.channel);
struct ClientSocket *client;
@@
-284,6
+287,9
@@
static IOHANDLER_LOG_BACKEND(log_iohandler_backend) {
}
void init_log() {
}
void init_log() {
+ #if HAVE_THREADS
+ THREAD_MUTEX_INIT(log_sync);
+ #endif
load_log_targets();
bind_reload(reload_log_targets, 0);
iolog_backend = log_iohandler_backend;
load_log_targets();
bind_reload(reload_log_targets, 0);
iolog_backend = log_iohandler_backend;