diff options
| author | Joseph Henry <[email protected]> | 2017-05-30 13:11:43 -0700 |
|---|---|---|
| committer | Joseph Henry <[email protected]> | 2017-05-30 13:11:43 -0700 |
| commit | 673d1b9a095025368177088bbf6875d7d3057f2f (patch) | |
| tree | 3291ad3a81fb076055e7bf173b5766ccdca675be /zto/controller/JSONDB.cpp | |
| parent | 5cfb4c38ef2ab3a3621bf568db6bb2b2bd83a357 (diff) | |
updated ZTO core1.1.2
Diffstat (limited to 'zto/controller/JSONDB.cpp')
| -rw-r--r-- | zto/controller/JSONDB.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zto/controller/JSONDB.cpp b/zto/controller/JSONDB.cpp index 31c0cc0..e0dd174 100644 --- a/zto/controller/JSONDB.cpp +++ b/zto/controller/JSONDB.cpp @@ -392,14 +392,14 @@ bool JSONDB::_load(const std::string &p) std::string objtype(OSUtils::jsonString(j["objtype"],"")); if ((id.length() == 16)&&(objtype == "network")) { - const uint64_t nwid = Utils::strToU64(id.c_str()); + const uint64_t nwid = Utils::hexStrToU64(id.c_str()); if (nwid) { Mutex::Lock _l(_networks_m); _networks[nwid].config = nlohmann::json::to_msgpack(j); } } else if ((id.length() == 10)&&(objtype == "member")) { - const uint64_t mid = Utils::strToU64(id.c_str()); - const uint64_t nwid = Utils::strToU64(OSUtils::jsonString(j["nwid"],"0").c_str()); + const uint64_t mid = Utils::hexStrToU64(id.c_str()); + const uint64_t nwid = Utils::hexStrToU64(OSUtils::jsonString(j["nwid"],"0").c_str()); if ((mid)&&(nwid)) { Mutex::Lock _l(_networks_m); _networks[nwid].members[mid] = nlohmann::json::to_msgpack(j); |
