Browse Source

remove calls to setlogmask (not atomic)

pull/114/head
Richard Fuchs 11 years ago
parent
commit
18977d4257
2 changed files with 0 additions and 11 deletions
  1. +0
    -8
      daemon/log.c
  2. +0
    -3
      daemon/main.c

+ 0
- 8
daemon/log.c View File

@ -194,11 +194,7 @@ out:
}
void cdrlog(const char* cdrbuffer) {
int previous;
int mask = LOG_MASK (LOG_INFO);
previous = setlogmask(mask);
syslog(LOG_INFO | _log_facility_cdr, "%s", cdrbuffer);
setlogmask(previous);
}
static unsigned int log_limiter_entry_hash(const void *p) {
@ -216,11 +212,7 @@ static int log_limiter_entry_equal(const void *a, const void *b) {
}
void rtcplog(const char* cdrbuffer) {
int previous;
int mask = LOG_MASK (LOG_INFO);
previous = setlogmask(mask);
syslog(LOG_INFO | _log_facility_rtcp, "%s", cdrbuffer);
setlogmask(previous);
}
void log_init() {


+ 0
- 3
daemon/main.c View File

@ -139,7 +139,6 @@ static void sighandler(gpointer x) {
else if (ret == SIGUSR1) {
if (get_log_level() > 0) {
g_atomic_int_add(&log_level, -1);
setlogmask(LOG_UPTO(get_log_level()));
ilog(get_log_level(), "Set log level to %d\n",
get_log_level());
}
@ -147,7 +146,6 @@ static void sighandler(gpointer x) {
else if (ret == SIGUSR2) {
if (get_log_level() < 7) {
g_atomic_int_add(&log_level, 1);
setlogmask(LOG_UPTO(get_log_level()));
ilog(get_log_level(), "Set log level to %d\n",
get_log_level());
}
@ -367,7 +365,6 @@ static void options(int *argc, char ***argv) {
if ((log_level < LOG_EMERG) || (log_level > LOG_DEBUG))
die("Invalid log level (--log_level)");
setlogmask(LOG_UPTO(log_level));
if (log_facility_s) {
if (!parse_log_facility(log_facility_s, &_log_facility)) {


Loading…
Cancel
Save