Windows now builds and runs selftest correctly, and fixed a Windows (and possibly other platforms) issue in Phy<>.
This commit is contained in:
parent
54954f5b88
commit
f5848972f9
12 changed files with 223 additions and 112 deletions
|
@ -685,7 +685,7 @@ bool IncomingPacket::_doNETWORK_CONFIG_REQUEST(const RuntimeEnvironment *RR,cons
|
|||
outp.append(pid);
|
||||
outp.append(nwid);
|
||||
outp.append((uint16_t)netconfStr.length());
|
||||
outp.append(netconfStr.data(),netconfStr.length());
|
||||
outp.append(netconfStr.data(),(unsigned int)netconfStr.length());
|
||||
outp.compress();
|
||||
if (outp.size() > ZT_PROTO_MAX_PACKET_LENGTH) {
|
||||
TRACE("NETWORK_CONFIG_REQUEST failed: internal error: netconf size %u is too large",(unsigned int)netconfStr.length());
|
||||
|
|
|
@ -437,7 +437,7 @@ void Network::learnBridgeRoute(const MAC &mac,const Address &addr)
|
|||
void Network::learnBridgedMulticastGroup(const MulticastGroup &mg,uint64_t now)
|
||||
{
|
||||
Mutex::Lock _l(_lock);
|
||||
unsigned long tmp = _multicastGroupsBehindMe.size();
|
||||
unsigned long tmp = (unsigned long)_multicastGroupsBehindMe.size();
|
||||
_multicastGroupsBehindMe[mg] = now;
|
||||
if (tmp != _multicastGroupsBehindMe.size())
|
||||
_announceMulticastGroups();
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue