| Index: webrtc/base/network.h
|
| diff --git a/webrtc/base/network.h b/webrtc/base/network.h
|
| index 2f2e1b3a45aaf3e3592a37374f149f63e4f4d4b2..b2adf160f2d6c5b3b4a8ba1b30482c24c46187d2 100644
|
| --- a/webrtc/base/network.h
|
| +++ b/webrtc/base/network.h
|
| @@ -273,6 +273,8 @@ class Network {
|
| AdapterType type);
|
| ~Network();
|
|
|
| + sigslot::signal1<const Network*> SignalInactive;
|
| +
|
| 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) {
|
| + SignalInactive(this);
|
| + }
|
| + }
|
|
|
| // Debugging description of this network
|
| std::string ToString() const;
|
|
|