summaryrefslogtreecommitdiff
path: root/cmds/statsd/src/shell/ShellSubscriber.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/statsd/src/shell/ShellSubscriber.cpp')
-rw-r--r--cmds/statsd/src/shell/ShellSubscriber.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds/statsd/src/shell/ShellSubscriber.cpp b/cmds/statsd/src/shell/ShellSubscriber.cpp
index 3cd49d722fea..1306a467e5c4 100644
--- a/cmds/statsd/src/shell/ShellSubscriber.cpp
+++ b/cmds/statsd/src/shell/ShellSubscriber.cpp
@@ -113,12 +113,12 @@ void ShellSubscriber::onLogEvent(const LogEvent& event) {
for (const auto& matcher : mPushedMatchers) {
if (matchesSimple(*mUidMap, matcher, event)) {
+ event.ToProto(mProto);
// First write the payload size.
size_t bufferSize = mProto.size();
write(mOutput, &bufferSize, sizeof(bufferSize));
// Then write the payload.
- event.ToProto(mProto);
mProto.flush(mOutput);
mProto.clear();
break;
@@ -137,4 +137,4 @@ void ShellSubscriber::binderDied(const wp<IBinder>& who) {
} // namespace statsd
} // namespace os
-} // namespace android \ No newline at end of file
+} // namespace android