summaryrefslogtreecommitdiff
path: root/wifi/1.5/default/ringbuffer.cpp
diff options
context:
space:
mode:
authorxshu <xshu@google.com>2021-07-11 19:57:02 -0700
committerxshu <xshu@google.com>2021-07-11 22:39:29 -0700
commitc905ea66d41b9418a73cbaf860b7ea6661313f59 (patch)
tree8339189c9a9e1c4cd04dc6f7b80afa352df1cbf8 /wifi/1.5/default/ringbuffer.cpp
parent60fc57326742a944c5bb4b0d303e3958e5efa061 (diff)
Clear ringbuffer after dumping to file
Clear the in-memory ringbuffer after writing to file. Bug: 193007899 Test: Manually verified ringbuffers are cleared with command "adb shell lshal debug android.hardware.wifi@1.5::IWifi" Change-Id: Icfa08634e948d7155e231458edd394a4d699fbaa
Diffstat (limited to 'wifi/1.5/default/ringbuffer.cpp')
-rw-r--r--wifi/1.5/default/ringbuffer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/wifi/1.5/default/ringbuffer.cpp b/wifi/1.5/default/ringbuffer.cpp
index 26971ff25b..f554111e61 100644
--- a/wifi/1.5/default/ringbuffer.cpp
+++ b/wifi/1.5/default/ringbuffer.cpp
@@ -47,6 +47,11 @@ const std::list<std::vector<uint8_t>>& Ringbuffer::getData() const {
return data_;
}
+void Ringbuffer::clear() {
+ data_.clear();
+ size_ = 0;
+}
+
} // namespace implementation
} // namespace V1_5
} // namespace wifi