summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2014-03-21 15:12:16 -0500
committerMark Salyzyn2014-03-21 17:43:31 -0500
commit22e287df0dfbc6e10c02f570d2fc0c42a2a6b7aa (patch)
tree116a1e1e60ac9bea738373f730205a4613c91c41 /logd/LogListener.cpp
parentee212d0053c6c8801dbd382d24c776040c4f8f0e (diff)
downloadplatform-system-core-22e287df0dfbc6e10c02f570d2fc0c42a2a6b7aa.tar.gz
platform-system-core-22e287df0dfbc6e10c02f570d2fc0c42a2a6b7aa.tar.xz
platform-system-core-22e287df0dfbc6e10c02f570d2fc0c42a2a6b7aa.zip
logcat: white and blacklist failure
- logcat improperly squashes out count - logcat test enhanced to catch failure - logd places entries in ascending sorted order Change-Id: If39d8e2c40852b520c98e7840034ab63c2538e5d
Diffstat (limited to 'logd/LogListener.cpp')
-rw-r--r--logd/LogListener.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/logd/LogListener.cpp b/logd/LogListener.cpp
index bef2097da..874302ac9 100644
--- a/logd/LogListener.cpp
+++ b/logd/LogListener.cpp
@@ -95,7 +95,9 @@ bool LogListener::onDataAvailable(SocketClient *cli) {
95 msg += sizeof(log_time); 95 msg += sizeof(log_time);
96 n -= sizeof(log_time); 96 n -= sizeof(log_time);
97 97
98 unsigned short len = n; 98 // NB: hdr.msg_flags & MSG_TRUNC is not tested, silently passing a
99 // truncated message to the logs.
100 unsigned short len = n; // cap to internal maximum
99 if (len == n) { 101 if (len == n) {
100 logbuf->log(log_id, realtime, cred->uid, cred->pid, tid, msg, len); 102 logbuf->log(log_id, realtime, cred->uid, cred->pid, tid, msg, len);
101 reader->notifyNewLog(); 103 reader->notifyNewLog();