diff --git a/node/Dictionary.hpp b/node/Dictionary.hpp index 59afb7c61..f89b6ffcc 100644 --- a/node/Dictionary.hpp +++ b/node/Dictionary.hpp @@ -62,40 +62,24 @@ template class Dictionary { public: - Dictionary() - { - _d[0] = (char)0; - } - - Dictionary(const char *s) - { - if (s) { - Utils::scopy(_d,sizeof(_d),s); - } else { - _d[0] = (char)0; - } - } - + Dictionary() { memset(_d,0,sizeof(_d)); } + Dictionary(const char *s) { this->load(s); } Dictionary(const char *s,unsigned int len) { - if (s) { - if (len > (C-1)) - len = C-1; - ZT_FAST_MEMCPY(_d,s,len); - _d[len] = (char)0; - } else { - _d[0] = (char)0; + for(unsigned int i=0;iluid().Value); #else Utils::scopy(tapdev,sizeof(tapdev),n.tap->deviceName().c_str()); @@ -1998,7 +1998,7 @@ public: case ZT_VIRTUAL_NETWORK_CONFIG_OPERATION_CONFIG_UPDATE: ZT_FAST_MEMCPY(&(n.config),nwc,sizeof(ZT_VirtualNetworkConfig)); if (n.tap) { // sanity check -#ifdef __WINDOWS__ +#if defined(__WINDOWS__) && !defined(ZT_SDK) // wait for up to 5 seconds for the WindowsEthernetTap to actually be initialized // // without WindowsEthernetTap::isInitialized() returning true, the won't actually @@ -2019,7 +2019,7 @@ public: case ZT_VIRTUAL_NETWORK_CONFIG_OPERATION_DOWN: case ZT_VIRTUAL_NETWORK_CONFIG_OPERATION_DESTROY: if (n.tap) { // sanity check -#ifdef __WINDOWS__ +#if defined(__WINDOWS__) && !defined(ZT_SDK) std::string winInstanceId(n.tap->instanceId()); #endif *nuptr = (void *)0;