summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorGrant Limberg <glimberg@gmail.com>2015-08-01 11:52:47 -0700
committerGrant Limberg <glimberg@gmail.com>2015-08-01 11:52:47 -0700
commit0fd6808e21755e55603f99086e28b47fe1348f04 (patch)
treeb37c08ca4c3073c4c65a9849335d03476501c970 /service
parentc9b4028cd32e940a3ccd1c44cb6ebcf850e145d0 (diff)
parentbf193dd3cfee7c343c5efd7b06df034d8b731d47 (diff)
downloadinfinitytier-0fd6808e21755e55603f99086e28b47fe1348f04.tar.gz
infinitytier-0fd6808e21755e55603f99086e28b47fe1348f04.zip
Merge branch 'master' into android-jni
Diffstat (limited to 'service')
-rw-r--r--service/OneService.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/service/OneService.cpp b/service/OneService.cpp
index 06e37a45..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
}
@@ -982,7 +993,7 @@ public:
_tapAssignedIps.erase(nwid);
#ifdef __WINDOWS__
if ((op == ZT1_VIRTUAL_NETWORK_CONFIG_OPERATION_DESTROY)&&(winInstanceId.length() > 0))
- WindowsEthernetTap::deletePersistentTapDevice(_homePath.c_str(),winInstanceId.c_str());
+ WindowsEthernetTap::deletePersistentTapDevice(winInstanceId.c_str());
#endif
}
break;