X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Ftincctl.c;h=54816a3de1c0737b4a8db3a6ae649f86436abe12;hb=a3f04cf74463e783eeddd45e998c1d15db0f868a;hp=cd2d3d8eab8806a42e01822548d4ea969660a2a5;hpb=bdeba3f9c26f9225c17c097ca490dc651cd40b90;p=tinc diff --git a/src/tincctl.c b/src/tincctl.c index cd2d3d8e..54816a3d 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -748,6 +748,14 @@ static bool remove_service(void) { return false; } + if(service) { + CloseServiceHandle(service); + } + + if(manager) { + CloseServiceHandle(manager); + } + fprintf(stderr, "%s service removed\n", identname); return true; @@ -1013,7 +1021,7 @@ static int cmd_start(int argc, char *argv[]) { #endif // Pass all log messages from the umbilical to stderr. - // A nul-byte right before closure means tincd started succesfully. + // A nul-byte right before closure means tincd started successfully. bool failure = true; char buf[1024]; ssize_t len; @@ -1859,7 +1867,7 @@ static int cmd_config(int argc, char *argv[]) { } } - /* Change "add" into "set" for variables that do not allow multiple occurences. + /* Change "add" into "set" for variables that do not allow multiple occurrences. Turn on warnings when it seems variables might be removed unintentionally. */ if(action == 1 && !(variables[i].type & VAR_MULTIPLE)) {