The syslog_daemon now ignores zero length messages, and the kernel's syslog
mechanism doesn't send them out any longer. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16153 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -138,6 +138,11 @@ SyslogDaemon::Daemon()
|
||||
// add terminating null byte
|
||||
message.message[bytesRead - sizeof(syslog_message)] = '\0';
|
||||
|
||||
if (!message.message[0]) {
|
||||
// ignore empty messages
|
||||
continue;
|
||||
}
|
||||
|
||||
fHandlerLock.Lock();
|
||||
|
||||
for (int32 i = fHandlers.CountItems(); i-- > 0;) {
|
||||
|
||||
@@ -164,6 +164,8 @@ syslog_output(syslog_message &message)
|
||||
} else {
|
||||
length = strlcpy(buffer + headerLength, message.message + pos,
|
||||
sizeof(buffer) - headerLength);
|
||||
if (length == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
length += headerLength;
|
||||
|
||||
Reference in New Issue
Block a user