| Index: webrtc/base/network.h
|
| diff --git a/webrtc/base/network.h b/webrtc/base/network.h
|
| index 10ce6f0e01dc1d8a324ddd15a576cdd9b4dc077b..a81bcabf660346f34d941a11494720b094084f58 100644
|
| --- a/webrtc/base/network.h
|
| +++ b/webrtc/base/network.h
|
| @@ -265,6 +265,8 @@ class Network {
|
| AdapterType type);
|
| ~Network();
|
|
|
| + sigslot::signal1<const Network*> SignalInactive;
|
| +
|
| const DefaultLocalAddressProvider* default_local_address_provider() {
|
| return default_local_address_provider_;
|
| }
|
| @@ -342,7 +344,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;
|
|
|