summaryrefslogtreecommitdiffstats
path: root/logd
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2018-10-19 13:51:35 -0700
committerTom Cherry <tomcherry@google.com>2018-10-19 13:51:35 -0700
commite2d30d14d0384a51ea21cb8dcc760848f84f802d (patch)
tree5bab21dc497529d9bbf1c1d7e6910582fd242bc1 /logd
parent30fa1b786418b6a47fb7e605134bc71a2414e412 (diff)
downloadsystem_core-e2d30d14d0384a51ea21cb8dcc760848f84f802d.tar.gz
system_core-e2d30d14d0384a51ea21cb8dcc760848f84f802d.tar.bz2
system_core-e2d30d14d0384a51ea21cb8dcc760848f84f802d.zip
logd: clear timeout if no start time is given
This code was accidentally deleted in the refactoring of 4f22786cc9c9b22d353487678058e2075a968a9d cause the logd.timeout_no_start test to start failing. Bug: 117942520 Test: logd unit tests Change-Id: Id7994230a89d7f8c2cb1f36a8ca1175a6b398de0
Diffstat (limited to 'logd')
-rw-r--r--logd/LogReader.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/logd/LogReader.cpp b/logd/LogReader.cpp
index 13c7af3a9..9db8c0047 100644
--- a/logd/LogReader.cpp
+++ b/logd/LogReader.cpp
@@ -212,6 +212,10 @@ bool LogReader::onDataAvailable(SocketClient* cli) {
cli->getUid(), cli->getGid(), cli->getPid(), nonBlock ? 'n' : 'b', tail,
logMask, (int)pid, sequence.nsec(), timeout);
+ if (sequence == log_time::EPOCH) {
+ timeout = 0;
+ }
+
LogTimeEntry::wrlock();
auto entry = std::make_unique<LogTimeEntry>(
*this, cli, nonBlock, tail, logMask, pid, sequence, timeout);