| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 | 751 |
| 752 ASSERT(false); | 752 ASSERT(false); |
| 753 return false; | 753 return false; |
| 754 } | 754 } |
| 755 | 755 |
| 756 // Bon voyage. | 756 // Bon voyage. |
| 757 int flags = (secure() && secure_dtls()) ? PF_SRTP_BYPASS : PF_NORMAL; | 757 int flags = (secure() && secure_dtls()) ? PF_SRTP_BYPASS : PF_NORMAL; |
| 758 int ret = channel->SendPacket(packet->data<char>(), packet->size(), | 758 int ret = channel->SendPacket(packet->data<char>(), packet->size(), |
| 759 updated_options, flags); | 759 updated_options, flags); |
| 760 if (ret != static_cast<int>(packet->size())) { | 760 if (ret != static_cast<int>(packet->size())) { |
| 761 if (channel->GetError() == EWOULDBLOCK) { | 761 if (channel->GetError() == ENOTCONN) { |
| 762 LOG(LS_WARNING) << "Got EWOULDBLOCK from socket."; | 762 LOG(LS_WARNING) << "Got ENOTCONN from transport."; |
| 763 SetReadyToSend(rtcp, false); | 763 SetReadyToSend(rtcp, false); |
| 764 } | 764 } |
| 765 return false; | 765 return false; |
| 766 } | 766 } |
| 767 return true; | 767 return true; |
| 768 } | 768 } |
| 769 | 769 |
| 770 bool BaseChannel::WantsPacket(bool rtcp, const rtc::CopyOnWriteBuffer* packet) { | 770 bool BaseChannel::WantsPacket(bool rtcp, const rtc::CopyOnWriteBuffer* packet) { |
| 771 // Protect ourselves against crazy data. | 771 // Protect ourselves against crazy data. |
| 772 if (!ValidPacket(rtcp, packet)) { | 772 if (!ValidPacket(rtcp, packet)) { |
| (...skipping 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2428 } | 2428 } |
| 2429 | 2429 |
| 2430 void DataChannel::OnStreamClosedRemotely(uint32_t sid) { | 2430 void DataChannel::OnStreamClosedRemotely(uint32_t sid) { |
| 2431 rtc::TypedMessageData<uint32_t>* message = | 2431 rtc::TypedMessageData<uint32_t>* message = |
| 2432 new rtc::TypedMessageData<uint32_t>(sid); | 2432 new rtc::TypedMessageData<uint32_t>(sid); |
| 2433 signaling_thread()->Post(RTC_FROM_HERE, this, MSG_STREAMCLOSEDREMOTELY, | 2433 signaling_thread()->Post(RTC_FROM_HERE, this, MSG_STREAMCLOSEDREMOTELY, |
| 2434 message); | 2434 message); |
| 2435 } | 2435 } |
| 2436 | 2436 |
| 2437 } // namespace cricket | 2437 } // namespace cricket |
| OLD | NEW |