Index: webrtc/p2p/base/stunserver.cc |
diff --git a/webrtc/p2p/base/stunserver.cc b/webrtc/p2p/base/stunserver.cc |
index fbc316bd47d70eb8195706c466736544780fa616..bac9fd596b4f06323937748d6ad3eb8e967b4487 100644 |
--- a/webrtc/p2p/base/stunserver.cc |
+++ b/webrtc/p2p/base/stunserver.cc |
@@ -28,7 +28,7 @@ void StunServer::OnPacket( |
const rtc::SocketAddress& remote_addr, |
const rtc::PacketTime& packet_time) { |
// Parse the STUN message; eat any messages that fail to parse. |
- rtc::ByteBuffer bbuf(buf, size); |
+ rtc::ByteBufferReader bbuf(buf, size); |
StunMessage msg; |
if (!msg.Read(&bbuf)) { |
return; |
@@ -72,7 +72,7 @@ void StunServer::SendErrorResponse( |
void StunServer::SendResponse( |
const StunMessage& msg, const rtc::SocketAddress& addr) { |
- rtc::ByteBuffer buf; |
+ rtc::ByteBufferWriter buf; |
msg.Write(&buf); |
rtc::PacketOptions options; |
if (socket_->SendTo(buf.Data(), buf.Length(), addr, options) < 0) |