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); |