| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 typedef rtc::ScopedMessageData<SctpInboundPacket> InboundPacketMessage; | 111 typedef rtc::ScopedMessageData<SctpInboundPacket> InboundPacketMessage; |
| 112 typedef rtc::ScopedMessageData<rtc::CopyOnWriteBuffer> OutboundPacketMessage; | 112 typedef rtc::ScopedMessageData<rtc::CopyOnWriteBuffer> OutboundPacketMessage; |
| 113 | 113 |
| 114 enum { | 114 enum { |
| 115 MSG_SCTPINBOUNDPACKET = 1, // MessageData is SctpInboundPacket | 115 MSG_SCTPINBOUNDPACKET = 1, // MessageData is SctpInboundPacket |
| 116 MSG_SCTPOUTBOUNDPACKET = 2, // MessageData is rtc:Buffer | 116 MSG_SCTPOUTBOUNDPACKET = 2, // MessageData is rtc:Buffer |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 // Helper for logging SCTP messages. | 119 // Helper for logging SCTP messages. |
| 120 void DebugSctpPrintf(const char* format, ...) { | 120 void DebugSctpPrintf(const char* format, ...) { |
| 121 #if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) | 121 #if RTC_DCHECK_IS_ON |
| 122 char s[255]; | 122 char s[255]; |
| 123 va_list ap; | 123 va_list ap; |
| 124 va_start(ap, format); | 124 va_start(ap, format); |
| 125 vsnprintf(s, sizeof(s), format, ap); | 125 vsnprintf(s, sizeof(s), format, ap); |
| 126 LOG(LS_INFO) << "SCTP: " << s; | 126 LOG(LS_INFO) << "SCTP: " << s; |
| 127 va_end(ap); | 127 va_end(ap); |
| 128 #endif | 128 #endif |
| 129 } | 129 } |
| 130 | 130 |
| 131 // Get the PPID to use for the terminating fragment of this type. | 131 // Get the PPID to use for the terminating fragment of this type. |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1057 } | 1057 } |
| 1058 case MSG_SCTPOUTBOUNDPACKET: { | 1058 case MSG_SCTPOUTBOUNDPACKET: { |
| 1059 std::unique_ptr<OutboundPacketMessage> pdata( | 1059 std::unique_ptr<OutboundPacketMessage> pdata( |
| 1060 static_cast<OutboundPacketMessage*>(msg->pdata)); | 1060 static_cast<OutboundPacketMessage*>(msg->pdata)); |
| 1061 OnPacketFromSctpToNetwork(pdata->data().get()); | 1061 OnPacketFromSctpToNetwork(pdata->data().get()); |
| 1062 break; | 1062 break; |
| 1063 } | 1063 } |
| 1064 } | 1064 } |
| 1065 } | 1065 } |
| 1066 } // namespace cricket | 1066 } // namespace cricket |
| OLD | NEW |