fix: silence_log handling - was always logging everything to syslog,even if set to >0
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
0.8.4dev
|
||||
========
|
||||
29-Jun-2021: - fix: silence_log handling - was always logging
|
||||
everything to syslog,even if set to >0
|
||||
27-Dec-2020: - plugin_stripheaders: deal with mode header field
|
||||
17-Sep-2020: - fix: buffer overflow in process_aclist if a
|
||||
wrong syntax in config file was used for ACLs.
|
||||
|
||||
@@ -241,7 +241,7 @@ int PLUGIN_PROCESS(int stage, sip_ticket_t *ticket){
|
||||
&& MSG_IS_RESPONSE(ticket->sipmsg)
|
||||
&& MSG_IS_RESPONSE_FOR(ticket->sipmsg, "REGISTER")) {
|
||||
sts = blacklist_update(ticket);
|
||||
} else if ((stage == PLUGIN_TIMER)) {
|
||||
} else if (stage == PLUGIN_TIMER) {
|
||||
static int count=0;
|
||||
/*&&&TODO: hmmm, still hardcoded... will be executed once per minute */
|
||||
if (++count >= 12) {
|
||||
|
||||
+3
-2
@@ -152,8 +152,6 @@ int main (int argc, char *argv[])
|
||||
* initialize the loggin subsystem
|
||||
*/
|
||||
log_init();
|
||||
/* set log silencing for syslog as requested in config */
|
||||
log_set_silence(configuration.silence_log);
|
||||
/* while not daemonized, log also to stderr */
|
||||
log_set_stderr(1);
|
||||
|
||||
@@ -257,6 +255,9 @@ int main (int argc, char *argv[])
|
||||
configuration.debuglevel=cmdline_debuglevel;
|
||||
}
|
||||
|
||||
/* set log silencing for syslog as requested in config */
|
||||
log_set_silence(configuration.silence_log);
|
||||
|
||||
/*
|
||||
* open a the pwfile instance, so we still have access after
|
||||
* we possibly have chroot()ed to somewhere.
|
||||
|
||||
Reference in New Issue
Block a user