summaryrefslogtreecommitdiff
path: root/osnet
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@zerotier.com>2014-08-07 19:08:41 -0700
committerAdam Ierymenko <adam.ierymenko@zerotier.com>2014-08-07 19:08:41 -0700
commit77457cbff14546a6b6173a46c0486767dab60847 (patch)
treeb9c5a7453d89678ed46cc51e51c2387c212e8055 /osnet
parentdb0d17cebba67dec344ee63c3b8ecbdc46f2814a (diff)
downloadinfinitytier-77457cbff14546a6b6173a46c0486767dab60847.tar.gz
infinitytier-77457cbff14546a6b6173a46c0486767dab60847.zip
Windows compile fixes, compiler warning fix, unfreed memory fix in main.c (though it would not have mattered since program exits immediately after).
Diffstat (limited to 'osnet')
-rw-r--r--osnet/WindowsEthernetTap.cpp4
-rw-r--r--osnet/WindowsEthernetTapFactory.cpp1
2 files changed, 3 insertions, 2 deletions
diff --git a/osnet/WindowsEthernetTap.cpp b/osnet/WindowsEthernetTap.cpp
index 16fc72d6..8326597a 100644
--- a/osnet/WindowsEthernetTap.cpp
+++ b/osnet/WindowsEthernetTap.cpp
@@ -188,11 +188,11 @@ WindowsEthernetTap::WindowsEthernetTap(
PROCESS_INFORMATION processInfo;
memset(&startupInfo,0,sizeof(STARTUPINFOA));
memset(&processInfo,0,sizeof(PROCESS_INFORMATION));
- if (!CreateProcessA(NULL,(LPSTR)(std::string("\"") + _pathToHelpers + WindowsEthernetTapFactory::WINENV.devcon + "\" install \"" + _pathToHelpers + _winEnv.tapDriver + "\" zttap200").c_str(),NULL,NULL,FALSE,0,NULL,NULL,&startupInfo,&processInfo)) {
+ if (!CreateProcessA(NULL,(LPSTR)(std::string("\"") + _pathToHelpers + WindowsEthernetTapFactory::WINENV.devcon + "\" install \"" + _pathToHelpers + WindowsEthernetTapFactory::WINENV.tapDriver + "\" zttap200").c_str(),NULL,NULL,FALSE,0,NULL,NULL,&startupInfo,&processInfo)) {
RegCloseKey(nwAdapters);
if (devconLog != INVALID_HANDLE_VALUE)
CloseHandle(devconLog);
- throw std::runtime_error(std::string("unable to find or execute devcon at ") + _winEnv.devcon);
+ throw std::runtime_error(std::string("unable to find or execute devcon at ") + WindowsEthernetTapFactory::WINENV.devcon);
}
WaitForSingleObject(processInfo.hProcess,INFINITE);
CloseHandle(processInfo.hProcess);
diff --git a/osnet/WindowsEthernetTapFactory.cpp b/osnet/WindowsEthernetTapFactory.cpp
index 6564e186..74703077 100644
--- a/osnet/WindowsEthernetTapFactory.cpp
+++ b/osnet/WindowsEthernetTapFactory.cpp
@@ -43,6 +43,7 @@ WindowsEthernetTapFactory::Env::Env()
tapDriver = ((is64Bit == TRUE) ? "\\tap-windows\\x64\\zttap200.inf" : "\\tap-windows\\x86\\zttap200.inf");
#endif
}
+const WindowsEthernetTapFactory::Env WindowsEthernetTapFactory::WINENV;
WindowsEthernetTapFactory::WindowsEthernetTapFactory(const char *pathToHelpers) :
_pathToHelpers(pathToHelpers)