OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 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 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 // Schedule an event to destroy TurnEntry for the connection, which is | 1004 // Schedule an event to destroy TurnEntry for the connection, which is |
1005 // already destroyed. | 1005 // already destroyed. |
1006 const rtc::SocketAddress& remote_address = conn->remote_candidate().address(); | 1006 const rtc::SocketAddress& remote_address = conn->remote_candidate().address(); |
1007 TurnEntry* entry = FindEntry(remote_address); | 1007 TurnEntry* entry = FindEntry(remote_address); |
1008 ASSERT(entry != NULL); | 1008 ASSERT(entry != NULL); |
1009 ScheduleEntryDestruction(entry); | 1009 ScheduleEntryDestruction(entry); |
1010 } | 1010 } |
1011 | 1011 |
1012 void TurnPort::ScheduleEntryDestruction(TurnEntry* entry) { | 1012 void TurnPort::ScheduleEntryDestruction(TurnEntry* entry) { |
1013 ASSERT(entry->destruction_timestamp() == 0); | 1013 ASSERT(entry->destruction_timestamp() == 0); |
1014 int64_t timestamp = rtc::Time64(); | 1014 int64_t timestamp = rtc::TimeMillis(); |
1015 entry->set_destruction_timestamp(timestamp); | 1015 entry->set_destruction_timestamp(timestamp); |
1016 invoker_.AsyncInvokeDelayed<void>( | 1016 invoker_.AsyncInvokeDelayed<void>( |
1017 thread(), | 1017 thread(), |
1018 rtc::Bind(&TurnPort::DestroyEntryIfNotCancelled, this, entry, timestamp), | 1018 rtc::Bind(&TurnPort::DestroyEntryIfNotCancelled, this, entry, timestamp), |
1019 TURN_PERMISSION_TIMEOUT); | 1019 TURN_PERMISSION_TIMEOUT); |
1020 } | 1020 } |
1021 | 1021 |
1022 void TurnPort::CancelEntryDestruction(TurnEntry* entry) { | 1022 void TurnPort::CancelEntryDestruction(TurnEntry* entry) { |
1023 ASSERT(entry->destruction_timestamp() != 0); | 1023 ASSERT(entry->destruction_timestamp() != 0); |
1024 entry->set_destruction_timestamp(0); | 1024 entry->set_destruction_timestamp(0); |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1512 } else { | 1512 } else { |
1513 state_ = STATE_UNBOUND; | 1513 state_ = STATE_UNBOUND; |
1514 port_->DestroyConnection(ext_addr_); | 1514 port_->DestroyConnection(ext_addr_); |
1515 } | 1515 } |
1516 } | 1516 } |
1517 void TurnEntry::OnChannelBindTimeout() { | 1517 void TurnEntry::OnChannelBindTimeout() { |
1518 state_ = STATE_UNBOUND; | 1518 state_ = STATE_UNBOUND; |
1519 port_->DestroyConnection(ext_addr_); | 1519 port_->DestroyConnection(ext_addr_); |
1520 } | 1520 } |
1521 } // namespace cricket | 1521 } // namespace cricket |
OLD | NEW |