Chromium Code Reviews| 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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 640 ASSERT(false); | 640 ASSERT(false); |
| 641 port->SendBindingErrorResponse(stun_msg, address, | 641 port->SendBindingErrorResponse(stun_msg, address, |
| 642 STUN_ERROR_SERVER_ERROR, | 642 STUN_ERROR_SERVER_ERROR, |
| 643 STUN_ERROR_REASON_SERVER_ERROR); | 643 STUN_ERROR_REASON_SERVER_ERROR); |
| 644 return; | 644 return; |
| 645 } | 645 } |
| 646 } | 646 } |
| 647 | 647 |
| 648 Connection* connection = | 648 Connection* connection = |
| 649 port->CreateConnection(remote_candidate, PortInterface::ORIGIN_THIS_PORT); | 649 port->CreateConnection(remote_candidate, PortInterface::ORIGIN_THIS_PORT); |
| 650 if (!connection) { | 650 if (!connection) { |
|
Taylor Brandstetter
2016/09/09 23:18:21
nit: Could you add a comment describing the legiti
| |
| 651 ASSERT(false); | |
| 652 port->SendBindingErrorResponse(stun_msg, address, STUN_ERROR_SERVER_ERROR, | 651 port->SendBindingErrorResponse(stun_msg, address, STUN_ERROR_SERVER_ERROR, |
| 653 STUN_ERROR_REASON_SERVER_ERROR); | 652 STUN_ERROR_REASON_SERVER_ERROR); |
| 654 return; | 653 return; |
| 655 } | 654 } |
| 656 | 655 |
| 657 LOG(LS_INFO) << "Adding connection from " | 656 LOG(LS_INFO) << "Adding connection from " |
| 658 << (remote_candidate_is_new ? "peer reflexive" : "resurrected") | 657 << (remote_candidate_is_new ? "peer reflexive" : "resurrected") |
| 659 << " candidate: " << remote_candidate.ToString(); | 658 << " candidate: " << remote_candidate.ToString(); |
| 660 AddConnection(connection); | 659 AddConnection(connection); |
| 661 connection->HandleBindingRequest(stun_msg); | 660 connection->HandleBindingRequest(stun_msg); |
| (...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1960 | 1959 |
| 1961 // During the initial state when nothing has been pinged yet, return the first | 1960 // During the initial state when nothing has been pinged yet, return the first |
| 1962 // one in the ordered |connections_|. | 1961 // one in the ordered |connections_|. |
| 1963 return *(std::find_if(connections_.begin(), connections_.end(), | 1962 return *(std::find_if(connections_.begin(), connections_.end(), |
| 1964 [conn1, conn2](Connection* conn) { | 1963 [conn1, conn2](Connection* conn) { |
| 1965 return conn == conn1 || conn == conn2; | 1964 return conn == conn1 || conn == conn2; |
| 1966 })); | 1965 })); |
| 1967 } | 1966 } |
| 1968 | 1967 |
| 1969 } // namespace cricket | 1968 } // namespace cricket |
| OLD | NEW |