aboutsummaryrefslogtreecommitdiff
path: root/src/common/log.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-03-17 03:37:52 +0000
committerNick Mathewson <nickm@torproject.org>2008-03-17 03:37:52 +0000
commitbd547e3cfc5608cbab9c571a5d05d7de838dba77 (patch)
tree48a24f83440036f865b7f0682bebbd9ce5251429 /src/common/log.c
parent23c355e4eab5765c697447bc9efdbe99110fab5b (diff)
downloadtor-bd547e3cfc5608cbab9c571a5d05d7de838dba77.tar.gz
tor-bd547e3cfc5608cbab9c571a5d05d7de838dba77.zip
r18861@catbus: nickm | 2008-03-16 23:22:56 -0400
Fix a couple of bugs in setting control log callback severity. svn:r14065
Diffstat (limited to 'src/common/log.c')
-rw-r--r--src/common/log.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/log.c b/src/common/log.c
index 8f55694ace..0aa78e4e28 100644
--- a/src/common/log.c
+++ b/src/common/log.c
@@ -571,10 +571,12 @@ change_callback_log_severity(int loglevelMin, int loglevelMax,
log_callback cb)
{
logfile_t *lf;
+ log_severity_list_t severities;
+ set_log_severity_config(loglevelMin, loglevelMax, &severities);
LOCK_LOGS();
for (lf = logfiles; lf; lf = lf->next) {
if (lf->callback == cb) {
- set_log_severity_config(loglevelMin, loglevelMax, lf->severities);
+ memcpy(lf->severities, &severities, sizeof(severities));
}
}
_log_global_min_severity = get_min_log_level();