diff options
author | qctecmdr <qctecmdr@localhost> | 2020-09-29 23:31:33 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2020-09-29 23:31:33 -0700 |
commit | eb68997c676b9a1f2a85ea514d91afa2397033af (patch) | |
tree | c2738618221c49b1223612ec3d1995af509ba2a1 /core | |
parent | 4d3922f9325268ed86cdc1f861f80546dcbffb11 (diff) | |
parent | 970e671b2eba9584daa6af8882d567c41d5413d9 (diff) |
Merge "Fix the issue that updateNetworkAvailability not work"
Diffstat (limited to 'core')
-rw-r--r-- | core/SystemStatus.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/core/SystemStatus.h b/core/SystemStatus.h index 9182f49..d7e60dd 100644 --- a/core/SystemStatus.h +++ b/core/SystemStatus.h @@ -504,12 +504,11 @@ public: mType = (int32_t)itemBase.getType(); } inline bool equals(const SystemStatusNetworkInfo& peer) { - for (uint8_t i = 0; i < MAX_NETWORK_HANDLES; ++i) { - if (!(mAllNetworkHandles[i] == peer.mAllNetworkHandles[i])) { - return false; - } - } - return true; + bool rtv = (peer.mConnected == mConnected); + for (uint8_t i = 0; rtv && i < MAX_NETWORK_HANDLES; ++i) { + rtv &= (mAllNetworkHandles[i] == peer.mAllNetworkHandles[i]); + } + return rtv; } inline virtual SystemStatusItemBase& collate(SystemStatusItemBase& curInfo) { uint64_t allTypes = (static_cast<SystemStatusNetworkInfo&>(curInfo)).mAllTypes; |