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

Unified Diff: webrtc/p2p/base/port.cc

Issue 1648813004: Remove candidates when doing continual gathering (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/p2p/base/port.cc
diff --git a/webrtc/p2p/base/port.cc b/webrtc/p2p/base/port.cc
index 7993cc02bc082819340ca1e80b974dd91716f995..22fe9016adc8d7a5f8cb67b626ae44ac42c3d2a5 100644
--- a/webrtc/p2p/base/port.cc
+++ b/webrtc/p2p/base/port.cc
@@ -20,6 +20,7 @@
#include "webrtc/base/helpers.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/messagedigest.h"
+#include "webrtc/base/network.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/stringencode.h"
#include "webrtc/base/stringutils.h"
@@ -195,6 +196,7 @@ void Port::Construct() {
ice_username_fragment_ = rtc::CreateRandomString(ICE_UFRAG_LENGTH);
password_ = rtc::CreateRandomString(ICE_PWD_LENGTH);
}
+ network_->SignalInterfaceDown.connect(this, &Port::OnNetworkDown);
pthatcher1 2016/02/10 00:01:41 Should this be OnNetworkInactive?
honghaiz3 2016/02/10 19:22:44 Done.
LOG_J(LS_INFO, this) << "Port created";
}
@@ -628,6 +630,11 @@ void Port::OnMessage(rtc::Message *pmsg) {
}
}
+void Port::OnNetworkDown(const rtc::Network* network) {
+ ASSERT(network == network_);
+ SignalStopped(this);
pthatcher1 2016/02/10 00:01:41 Should we destroy the port as well? If not, shoul
honghaiz3 2016/02/10 19:22:44 Done. Changed to SignalNetworkInactive. Better not
+}
+
std::string Port::ToString() const {
std::stringstream ss;
ss << "Port[" << content_name_ << ":" << component_

Powered by Google App Engine
This is Rietveld 408576698