diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-05-11 14:13:38 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-05-11 14:13:38 -0700 |
commit | 426b7c2c767e797f586d38870f5e737b5cc9ba14 (patch) | |
tree | b2f56d76bd50c346e8ef1933eaa711338e863f02 /controller | |
parent | 22780a8504b634145c831101fcac9fa57453d0bd (diff) | |
download | infinitytier-426b7c2c767e797f586d38870f5e737b5cc9ba14.tar.gz infinitytier-426b7c2c767e797f586d38870f5e737b5cc9ba14.zip |
Stupid bug is stupid.
Diffstat (limited to 'controller')
-rw-r--r-- | controller/JSONDB.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/controller/JSONDB.cpp b/controller/JSONDB.cpp index 31c0cc05..3b98a7ac 100644 --- a/controller/JSONDB.cpp +++ b/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(const char *s)(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); |