More Windows service work... it builds! Now to do a new installer and test. Also fix a Windows compile warning in Switch.cpp.
This commit is contained in:
parent
8a7486577a
commit
5b97bb247e
6 changed files with 54 additions and 141 deletions
4
main.cpp
4
main.cpp
|
@ -628,6 +628,7 @@ int main(int argc,char **argv)
|
|||
if (!winRunFromCommandLine) {
|
||||
ZeroTierOneService zt1Service;
|
||||
if (CServiceBase::Run(zt1Service) == TRUE) {
|
||||
// Normal termination of service process
|
||||
return 0;
|
||||
} else {
|
||||
fprintf(stderr,"%s: unable to start service (try -h for help)"ZT_EOL_S,argv[0]);
|
||||
|
@ -637,7 +638,6 @@ int main(int argc,char **argv)
|
|||
#endif
|
||||
{
|
||||
int exitCode = 0;
|
||||
|
||||
try {
|
||||
node = new Node(homeDir,port,controlPort);
|
||||
switch(node->run()) {
|
||||
|
@ -669,11 +669,9 @@ int main(int argc,char **argv)
|
|||
fprintf(stderr,"%s: unexpected exception!"ZT_EOL_S,argv[0]);
|
||||
exitCode = 3;
|
||||
}
|
||||
|
||||
#ifdef __UNIX_LIKE__
|
||||
Utils::rm((std::string(homeDir)+"/zerotier-one.pid").c_str());
|
||||
#endif
|
||||
|
||||
return exitCode;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue