From 9df88a3933ae75ff2ec9bfa951a71fcc0164df74 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 31 Jul 2013 10:05:00 -0400 Subject: Change mind again... dump Http. Launcher will do this and will use libcurl. Also fix some format string errors. --- node/Network.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'node/Network.hpp') 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) -- cgit v1.2.3