summaryrefslogtreecommitdiff
path: root/node/NetworkConfig.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-04-26 17:20:31 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-04-26 17:20:31 -0700
commit59eb09d06318c8378193dfd40fc37bc308ee9044 (patch)
tree5430b57af2b6da25017f9056823a2219086cfadb /node/NetworkConfig.hpp
parentb9dba97fdb8644e3c427b079d81ed9db3697bf1b (diff)
downloadinfinitytier-59eb09d06318c8378193dfd40fc37bc308ee9044.tar.gz
infinitytier-59eb09d06318c8378193dfd40fc37bc308ee9044.zip
Deserialize new style netconf.
Diffstat (limited to 'node/NetworkConfig.hpp')
-rw-r--r--node/NetworkConfig.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/node/NetworkConfig.hpp b/node/NetworkConfig.hpp
index 6e91cb9d..73f1e3f2 100644
--- a/node/NetworkConfig.hpp
+++ b/node/NetworkConfig.hpp
@@ -529,6 +529,8 @@ public:
}
}
+ _com.serialize(b);
+
b.append((uint16_t)0); // extended bytes, currently 0 since unused
}
@@ -540,7 +542,7 @@ public:
unsigned int p = startAt;
if (b[p++] != ZT_NETWORKCONFIG_V2_MARKER_BYTE)
- throw std::invalid_argument("use fromDictionary() for old style netconf deserialization");
+ throw std::invalid_argument("unrecognized format");
if (b.template at<uint16_t>(p) != 0)
throw std::invalid_argument("unrecognized version");
p += 2;
@@ -660,6 +662,8 @@ public:
p += rlen;
}
+ p += _com.deserialize(b,p);
+
p += b.template at<uint16_t>(p) + 2;
return (p - startAt);