summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@zerotier.com>2015-07-30 17:00:57 -0700
committerAdam Ierymenko <adam.ierymenko@zerotier.com>2015-07-30 17:00:57 -0700
commit620562f7cfcfd1c7d9d0903556230fb80e2199fe (patch)
tree0b83bb74a002929c91ecb30192214dee6238b729 /service
parent922d9657b9d90df5cdf313b3ebe4d0280d0ff47a (diff)
downloadinfinitytier-620562f7cfcfd1c7d9d0903556230fb80e2199fe.tar.gz
infinitytier-620562f7cfcfd1c7d9d0903556230fb80e2199fe.zip
Because Windows, because Windows. Now it upgrades correctly from 1.0.1, including automatic driver update from NDIS5 to NDIS6. Also a bit more robust on creating new ports, just in case.
Diffstat (limited to 'service')
-rw-r--r--service/OneService.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/service/OneService.cpp b/service/OneService.cpp
index 4ee473f8..670d5641 100644
--- a/service/OneService.cpp
+++ b/service/OneService.cpp
@@ -943,6 +943,17 @@ public:
friendlyName,
StapFrameHandler,
(void *)this))).first;
+ } catch (std::exception &exc) {
+#ifdef __WINDOWS__
+ FILE *tapFailLog = fopen((_homePath + ZT_PATH_SEPARATOR_S"port_error_log.txt").c_str(),"a");
+ if (tapFailLog) {
+ fprintf(tapFailLog,"%.16llx: %s"ZT_EOL_S,(unsigned long long)nwid,exc.what());
+ fclose(tapFailLog);
+ }
+#else
+ fprintf(stderr,"ERROR: unable to configure virtual network port: %s"ZT_EOL_S,exc.what());
+#endif
+ return -999;
} catch ( ... ) {
return -999; // tap init failed
}