Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(659)

Unified Diff: webrtc/p2p/base/stunrequest.cc

Issue 1821083002: Split ByteBuffer into writer/reader objects. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/base/stun_unittest.cc ('k') | webrtc/p2p/base/stunserver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/stunrequest.cc
diff --git a/webrtc/p2p/base/stunrequest.cc b/webrtc/p2p/base/stunrequest.cc
index 9ceb6dabb747d7da3f49635471ac63b7d14fa4a4..546dd157d9949f5128f44a17d08f06cf5252450b 100644
--- a/webrtc/p2p/base/stunrequest.cc
+++ b/webrtc/p2p/base/stunrequest.cc
@@ -138,7 +138,7 @@ bool StunRequestManager::CheckResponse(const char* data, size_t size) {
// Parse the STUN message and continue processing as usual.
- rtc::ByteBuffer buf(data, size);
+ rtc::ByteBufferReader buf(data, size);
rtc::scoped_ptr<StunMessage> response(iter->second->msg_->CreateNew());
if (!response->Read(&buf)) {
LOG(LS_WARNING) << "Failed to read STUN response " << rtc::hex_encode(id);
@@ -213,7 +213,7 @@ void StunRequest::OnMessage(rtc::Message* pmsg) {
tstamp_ = rtc::Time64();
- rtc::ByteBuffer buf;
+ rtc::ByteBufferWriter buf;
msg_->Write(&buf);
manager_->SignalSendPacket(buf.Data(), buf.Length(), this);
« no previous file with comments | « webrtc/p2p/base/stun_unittest.cc ('k') | webrtc/p2p/base/stunserver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698