diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-03-17 03:37:52 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-03-17 03:37:52 +0000 |
commit | bd547e3cfc5608cbab9c571a5d05d7de838dba77 (patch) | |
tree | 48a24f83440036f865b7f0682bebbd9ce5251429 /src/or/control.c | |
parent | 23c355e4eab5765c697447bc9efdbe99110fab5b (diff) | |
download | tor-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/or/control.c')
-rw-r--r-- | src/or/control.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/or/control.c b/src/or/control.c index a8fd46de07..01d5918112 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -248,9 +248,13 @@ control_adjust_event_log_severity(void) if (max_log_event < EVENT_ERR_MSG) max_log_event = EVENT_ERR_MSG; } - change_callback_log_severity(event_to_log_severity(min_log_event), - event_to_log_severity(max_log_event), - control_event_logmsg); + if (min_log_event <= max_log_event) + change_callback_log_severity(event_to_log_severity(min_log_event), + event_to_log_severity(max_log_event), + control_event_logmsg); + else + change_callback_log_severity(LOG_ERR, LOG_ERR, + control_event_logmsg); } /** Return true iff the event with code <b>c</b> is being sent to any current |