diff options
Diffstat (limited to 'logd/LogListener.cpp')
-rw-r--r-- | logd/LogListener.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/logd/LogListener.cpp b/logd/LogListener.cpp index 3b4ef8822..05ced062b 100644 --- a/logd/LogListener.cpp +++ b/logd/LogListener.cpp | |||
@@ -98,10 +98,11 @@ bool LogListener::onDataAvailable(SocketClient *cli) { | |||
98 | // NB: hdr.msg_flags & MSG_TRUNC is not tested, silently passing a | 98 | // NB: hdr.msg_flags & MSG_TRUNC is not tested, silently passing a |
99 | // truncated message to the logs. | 99 | // truncated message to the logs. |
100 | 100 | ||
101 | logbuf->log((log_id_t)header->id, header->realtime, | 101 | if (logbuf->log((log_id_t)header->id, header->realtime, |
102 | cred->uid, cred->pid, header->tid, msg, | 102 | cred->uid, cred->pid, header->tid, msg, |
103 | ((size_t) n <= USHRT_MAX) ? (unsigned short) n : USHRT_MAX); | 103 | ((size_t) n <= USHRT_MAX) ? (unsigned short) n : USHRT_MAX) >= 0) { |
104 | reader->notifyNewLog(); | 104 | reader->notifyNewLog(); |
105 | } | ||
105 | 106 | ||
106 | return true; | 107 | return true; |
107 | } | 108 | } |