summaryrefslogtreecommitdiff
path: root/node/Node.cpp
diff options
context:
space:
mode:
authorGrant Limberg <glimberg@gmail.com>2015-04-24 16:48:48 -0700
committerGrant Limberg <glimberg@gmail.com>2015-04-24 16:48:48 -0700
commit0f808e11df8646e82eb3e178896dc8d88f8d79d3 (patch)
treea09e8c27911f73e65ab2ec0ef0068d143d89a72c /node/Node.cpp
parent1a65a79e57521a0d20d6a2c6d18ab8cf169fcd50 (diff)
parentce09e363dc95d801e8707a29a0d585089d6c3d09 (diff)
downloadinfinitytier-0f808e11df8646e82eb3e178896dc8d88f8d79d3.tar.gz
infinitytier-0f808e11df8646e82eb3e178896dc8d88f8d79d3.zip
Merge branch 'adamierymenko-dev' into android-jni
Diffstat (limited to 'node/Node.cpp')
-rw-r--r--node/Node.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/node/Node.cpp b/node/Node.cpp
index 2ffdeb96..e77a977e 100644
--- a/node/Node.cpp
+++ b/node/Node.cpp
@@ -60,7 +60,7 @@ Node::Node(
ZT1_EventCallback eventCallback,
const char *overrideRootTopology) :
RR(new RuntimeEnvironment(this)),
- _uptr(uptr),
+ _uPtr(uptr),
_dataStoreGetFunction(dataStoreGetFunction),
_dataStorePutFunction(dataStorePutFunction),
_wirePacketSendFunction(wirePacketSendFunction),
@@ -426,7 +426,7 @@ std::string Node::dataStoreGet(const char *name)
std::string r;
unsigned long olen = 0;
do {
- long n = _dataStoreGetFunction(reinterpret_cast<ZT1_Node *>(this),_uptr,name,buf,sizeof(buf),r.length(),&olen);
+ long n = _dataStoreGetFunction(reinterpret_cast<ZT1_Node *>(this),_uPtr,name,buf,sizeof(buf),(unsigned long)r.length(),&olen);
if (n <= 0)
return std::string();
r.append(buf,n);
@@ -454,14 +454,14 @@ void Node::postTrace(const char *module,unsigned int line,const char *fmt,...)
Mutex::Lock _l(traceLock);
+ time_t now = (time_t)(_now / 1000ULL);
#ifdef __WINDOWS__
ctime_s(tmp3,sizeof(tmp3),&now);
char *nowstr = tmp3;
#else
- time_t now = (time_t)(_now / 1000ULL);
char *nowstr = ctime_r(&now,tmp3);
#endif
- unsigned long nowstrlen = strlen(nowstr);
+ unsigned long nowstrlen = (unsigned long)strlen(nowstr);
if (nowstr[nowstrlen-1] == '\n')
nowstr[--nowstrlen] = (char)0;
if (nowstr[nowstrlen-1] == '\r')