| Index: webrtc/api/datachannel.cc
|
| diff --git a/webrtc/api/datachannel.cc b/webrtc/api/datachannel.cc
|
| index b4dc5d89130dc7bb5a98eed491fc009274e999b6..612d7e0b38256b27a00c0716645d825c1259e365 100644
|
| --- a/webrtc/api/datachannel.cc
|
| +++ b/webrtc/api/datachannel.cc
|
| @@ -324,7 +324,7 @@ void DataChannel::OnMessage(rtc::Message* msg) {
|
|
|
| void DataChannel::OnDataReceived(cricket::DataChannel* channel,
|
| const cricket::ReceiveDataParams& params,
|
| - const rtc::Buffer& payload) {
|
| + const rtc::CopyOnWriteBuffer& payload) {
|
| uint32_t expected_ssrc =
|
| (data_channel_type_ == cricket::DCT_RTP) ? receive_ssrc_ : config_.id;
|
| if (params.ssrc != expected_ssrc) {
|
| @@ -422,11 +422,11 @@ void DataChannel::UpdateState() {
|
| }
|
| if (connected_to_provider_) {
|
| if (handshake_state_ == kHandshakeShouldSendOpen) {
|
| - rtc::Buffer payload;
|
| + rtc::CopyOnWriteBuffer payload;
|
| WriteDataChannelOpenMessage(label_, config_, &payload);
|
| SendControlMessage(payload);
|
| } else if (handshake_state_ == kHandshakeShouldSendAck) {
|
| - rtc::Buffer payload;
|
| + rtc::CopyOnWriteBuffer payload;
|
| WriteDataChannelOpenAckMessage(&payload);
|
| SendControlMessage(payload);
|
| }
|
| @@ -595,11 +595,11 @@ void DataChannel::SendQueuedControlMessages() {
|
| }
|
| }
|
|
|
| -void DataChannel::QueueControlMessage(const rtc::Buffer& buffer) {
|
| +void DataChannel::QueueControlMessage(const rtc::CopyOnWriteBuffer& buffer) {
|
| queued_control_data_.Push(new DataBuffer(buffer, true));
|
| }
|
|
|
| -bool DataChannel::SendControlMessage(const rtc::Buffer& buffer) {
|
| +bool DataChannel::SendControlMessage(const rtc::CopyOnWriteBuffer& buffer) {
|
| bool is_open_message = handshake_state_ == kHandshakeShouldSendOpen;
|
|
|
| ASSERT(data_channel_type_ == cricket::DCT_SCTP &&
|
|
|