Index: webrtc/base/network.h |
diff --git a/webrtc/base/network.h b/webrtc/base/network.h |
index 2f2e1b3a45aaf3e3592a37374f149f63e4f4d4b2..181a1961ca77637800c44c9de75cc893d6f47a8d 100644 |
--- a/webrtc/base/network.h |
+++ b/webrtc/base/network.h |
@@ -273,6 +273,8 @@ class Network { |
AdapterType type); |
~Network(); |
+ sigslot::signal1<const Network*> SignalInterfaceDown; |
pthatcher1
2016/02/10 00:01:41
Should this be SignalActiveChanged or SignalInacti
honghaiz3
2016/02/10 19:22:44
Done.
|
+ |
const DefaultLocalAddressProvider* default_local_address_provider() { |
return default_local_address_provider_; |
} |
@@ -350,7 +352,15 @@ class Network { |
// we do not remove it (because it may be used elsewhere). Instead, we mark |
// it inactive, so that we can detect network changes properly. |
bool active() const { return active_; } |
- void set_active(bool active) { active_ = active; } |
+ void set_active(bool active) { |
+ if (active_ == active) { |
+ return; |
+ } |
+ active_ = active; |
+ if (!active) { |
+ SignalInterfaceDown(this); |
+ } |
+ } |
// Debugging description of this network |
std::string ToString() const; |