diff options
author | Glenn Kasten <gkasten@google.com> | 2013-10-15 09:25:11 -0700 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2014-02-18 11:49:18 -0800 |
commit | c02c96161dde9d6ca7b408cf08fcf10bd8e61a54 (patch) | |
tree | e325f99ffb91639a73aab6155ae35fd27f115258 /media/libnbaio | |
parent | 4e01ef6b2f6d288b9aa83b5817adad02cecc429f (diff) | |
download | frameworks_av-c02c96161dde9d6ca7b408cf08fcf10bd8e61a54.zip frameworks_av-c02c96161dde9d6ca7b408cf08fcf10bd8e61a54.tar.gz frameworks_av-c02c96161dde9d6ca7b408cf08fcf10bd8e61a54.tar.bz2 |
Fix bug with not reporting lost bytes
Change-Id: I431d989dbd115b43822e9e48fd4c2b8e6322cfe3
Diffstat (limited to 'media/libnbaio')
-rw-r--r-- | media/libnbaio/NBLog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/media/libnbaio/NBLog.cpp b/media/libnbaio/NBLog.cpp index 895fd60..96738a7 100644 --- a/media/libnbaio/NBLog.cpp +++ b/media/libnbaio/NBLog.cpp @@ -341,8 +341,8 @@ void NBLog::Reader::dump(int fd, size_t indent) mFd = fd; mIndent = indent; String8 timestamp, body; - if (i > 0) { - lost += i; + lost += i; + if (lost > 0) { body.appendFormat("warning: lost %u bytes worth of events", lost); // TODO timestamp empty here, only other choice to wait for the first timestamp event in the // log to push it out. Consider keeping the timestamp/body between calls to readAt(). |