Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: webrtc/p2p/base/relayserver.cc

Issue 2019423006: Adding more detail to MessageQueue::Dispatch logging. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing one more place where RTC_FROM_HERE wasn't used. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/p2p/base/relayport.cc ('k') | webrtc/p2p/base/stunrequest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 lifetime_(lifetime) { 661 lifetime_(lifetime) {
662 // For now, every connection uses the standard magic cookie value. 662 // For now, every connection uses the standard magic cookie value.
663 magic_cookie_.append( 663 magic_cookie_.append(
664 reinterpret_cast<const char*>(TURN_MAGIC_COOKIE_VALUE), 664 reinterpret_cast<const char*>(TURN_MAGIC_COOKIE_VALUE),
665 sizeof(TURN_MAGIC_COOKIE_VALUE)); 665 sizeof(TURN_MAGIC_COOKIE_VALUE));
666 666
667 // Initialize the last-used time to now. 667 // Initialize the last-used time to now.
668 NoteUsed(); 668 NoteUsed();
669 669
670 // Set the first timeout check. 670 // Set the first timeout check.
671 server_->thread()->PostDelayed(lifetime_, this, MSG_LIFETIME_TIMER); 671 server_->thread()->PostDelayed(RTC_FROM_HERE, lifetime_, this,
672 MSG_LIFETIME_TIMER);
672 } 673 }
673 674
674 RelayServerBinding::~RelayServerBinding() { 675 RelayServerBinding::~RelayServerBinding() {
675 // Clear the outstanding timeout check. 676 // Clear the outstanding timeout check.
676 server_->thread()->Clear(this); 677 server_->thread()->Clear(this);
677 678
678 // Clean up all of the connections. 679 // Clean up all of the connections.
679 for (size_t i = 0; i < internal_connections_.size(); ++i) 680 for (size_t i = 0; i < internal_connections_.size(); ++i)
680 delete internal_connections_[i]; 681 delete internal_connections_[i];
681 for (size_t i = 0; i < external_connections_.size(); ++i) 682 for (size_t i = 0; i < external_connections_.size(); ++i)
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 void RelayServerBinding::OnMessage(rtc::Message *pmsg) { 733 void RelayServerBinding::OnMessage(rtc::Message *pmsg) {
733 if (pmsg->message_id == MSG_LIFETIME_TIMER) { 734 if (pmsg->message_id == MSG_LIFETIME_TIMER) {
734 ASSERT(!pmsg->pdata); 735 ASSERT(!pmsg->pdata);
735 736
736 // If the lifetime timeout has been exceeded, then send a signal. 737 // If the lifetime timeout has been exceeded, then send a signal.
737 // Otherwise, just keep waiting. 738 // Otherwise, just keep waiting.
738 if (rtc::TimeMillis() >= last_used_ + lifetime_) { 739 if (rtc::TimeMillis() >= last_used_ + lifetime_) {
739 LOG(LS_INFO) << "Expiring binding " << username_; 740 LOG(LS_INFO) << "Expiring binding " << username_;
740 SignalTimeout(this); 741 SignalTimeout(this);
741 } else { 742 } else {
742 server_->thread()->PostDelayed(lifetime_, this, MSG_LIFETIME_TIMER); 743 server_->thread()->PostDelayed(RTC_FROM_HERE, lifetime_, this,
744 MSG_LIFETIME_TIMER);
743 } 745 }
744 746
745 } else { 747 } else {
746 ASSERT(false); 748 ASSERT(false);
747 } 749 }
748 } 750 }
749 751
750 } // namespace cricket 752 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/relayport.cc ('k') | webrtc/p2p/base/stunrequest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698