mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Removes trailing spaces in control event log
This commit is contained in:
committed by
Nick Mathewson
parent
2edda444da
commit
ec7a6757ec
@@ -1385,6 +1385,16 @@ control_event_logmsg(int severity, log_domain_mask_t domain, const char *msg)
|
||||
for (cp = b; *cp; ++cp)
|
||||
if (*cp == '\r' || *cp == '\n')
|
||||
*cp = ' ';
|
||||
|
||||
/* Remove trailing spaces */
|
||||
for (--cp; *cp == ' ' && cp >= b; --cp)
|
||||
*cp = '\0';
|
||||
|
||||
if ( cp == b ){
|
||||
++disable_log_messages;
|
||||
tor_assert_nonfatal(*b);
|
||||
--disable_log_messages;
|
||||
}
|
||||
}
|
||||
switch (severity) {
|
||||
case LOG_DEBUG: s = "DEBUG"; break;
|
||||
|
||||
Reference in New Issue
Block a user