diff options
| author | Adam Ierymenko <[email protected]> | 2017-08-16 14:41:42 -0700 |
|---|---|---|
| committer | Adam Ierymenko <[email protected]> | 2017-08-16 14:41:42 -0700 |
| commit | 1ce0dcf0eab6a490c13a691f046f0e3eaee29384 (patch) | |
| tree | 97000434f416ee929628a2d7f3c064becd19432f /controller/JSONDB.cpp | |
| parent | 1387e15c1b585d6305606c91e7ce3c320e8aa760 (diff) | |
Another Central harnessed mode fix.
Diffstat (limited to 'controller/JSONDB.cpp')
| -rw-r--r-- | controller/JSONDB.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/controller/JSONDB.cpp b/controller/JSONDB.cpp index a0dd50c2..9813239e 100644 --- a/controller/JSONDB.cpp +++ b/controller/JSONDB.cpp @@ -164,15 +164,11 @@ void JSONDB::saveNetwork(const uint64_t networkId,const nlohmann::json &networkC char n[64]; OSUtils::ztsnprintf(n,sizeof(n),"network/%.16llx",(unsigned long long)networkId); writeRaw(n,OSUtils::jsonDump(networkConfig,-1)); - bool update; { Mutex::Lock _l(_networks_m); _NW &nw = _networks[networkId]; - update = !nw.config.empty(); nw.config = nlohmann::json::to_msgpack(networkConfig); } - if (update) - _parent->onNetworkUpdate(networkId); _recomputeSummaryInfo(networkId); } @@ -181,16 +177,12 @@ void JSONDB::saveNetworkMember(const uint64_t networkId,const uint64_t nodeId,co char n[256]; OSUtils::ztsnprintf(n,sizeof(n),"network/%.16llx/member/%.10llx",(unsigned long long)networkId,(unsigned long long)nodeId); writeRaw(n,OSUtils::jsonDump(memberConfig,-1)); - bool update; { Mutex::Lock _l(_networks_m); std::vector<uint8_t> &m = _networks[networkId].members[nodeId]; - update = !m.empty(); m = nlohmann::json::to_msgpack(memberConfig); _members[nodeId].insert(networkId); } - if (update) - _parent->onNetworkMemberUpdate(networkId,nodeId); _recomputeSummaryInfo(networkId); } |
