diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-07-31 10:05:00 -0400 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-07-31 10:05:00 -0400 |
| commit | 9df88a3933ae75ff2ec9bfa951a71fcc0164df74 (patch) | |
| tree | 8f7584a67689685ca4c738aae1c0f8b330130683 /node/Network.hpp | |
| parent | 3daea24d504af214bfac1bae41727e93ed8a6774 (diff) | |
| download | infinitytier-9df88a3933ae75ff2ec9bfa951a71fcc0164df74.tar.gz infinitytier-9df88a3933ae75ff2ec9bfa951a71fcc0164df74.zip | |
Change mind again... dump Http. Launcher will do this and will use libcurl. Also fix some format string errors.
Diffstat (limited to 'node/Network.hpp')
| -rw-r--r-- | node/Network.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/node/Network.hpp b/node/Network.hpp index 62c0e978..637c6664 100644 --- a/node/Network.hpp +++ b/node/Network.hpp @@ -107,14 +107,14 @@ public: inline void setNetworkId(uint64_t id) { char buf[32]; - sprintf(buf,"%llu",id); + sprintf(buf,"%.16llx",(unsigned long long)id); (*this)["nwid"] = buf; } inline uint64_t networkId() const throw(std::invalid_argument) { - return strtoull(get("nwid").c_str(),(char **)0,10); + return strtoull(get("nwid").c_str(),(char **)0,16); } inline void setPeerAddress(Address &a) @@ -137,9 +137,9 @@ public: inline void setTimestamp(uint64_t ts,uint64_t maxDelta) { char foo[32]; - sprintf(foo,"%llu",ts); + sprintf(foo,"%llu",(unsigned long long)ts); (*this)["ts"] = foo; - sprintf(foo,"%llu",maxDelta); + sprintf(foo,"%llu",(unsigned long long)maxDelta); (*this)["~ts"] = foo; } @@ -211,14 +211,14 @@ public: inline void setNetworkId(uint64_t id) { char buf[32]; - sprintf(buf,"%llu",id); + sprintf(buf,"%.16llx",(unsigned long long)id); (*this)["nwid"] = buf; } inline uint64_t networkId() const throw(std::invalid_argument) { - return strtoull(get("nwid").c_str(),(char **)0,10); + return strtoull(get("nwid").c_str(),(char **)0,16); } inline void setPeerAddress(Address &a) |
