projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Put Subnet weight in a separate environment variable.
[tinc]
/
src
/
process.c
diff --git
a/src/process.c
b/src/process.c
index
0ea65b3
..
f03f12a
100644
(file)
--- a/
src/process.c
+++ b/
src/process.c
@@
-1,7
+1,7
@@
/*
process.c -- process management functions
/*
process.c -- process management functions
- Copyright (C) 1999-200
4 Ivo Timmermans <ivo@tinc-vpn.org>
,
- 2000-200
4
Guus Sliepen <guus@tinc-vpn.org>
+ Copyright (C) 1999-200
5 Ivo Timmermans
,
+ 2000-200
7
Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-154,6
+154,9
@@
bool remove_service(void) {
DWORD WINAPI controlhandler(DWORD request, DWORD type, LPVOID boe, LPVOID bah) {
switch(request) {
DWORD WINAPI controlhandler(DWORD request, DWORD type, LPVOID boe, LPVOID bah) {
switch(request) {
+ case SERVICE_CONTROL_INTERROGATE:
+ SetServiceStatus(statushandle, &status);
+ return NO_ERROR;
case SERVICE_CONTROL_STOP:
logger(LOG_NOTICE, _("Got %s request"), "SERVICE_CONTROL_STOP");
break;
case SERVICE_CONTROL_STOP:
logger(LOG_NOTICE, _("Got %s request"), "SERVICE_CONTROL_STOP");
break;
@@
-368,19
+371,23
@@
bool execute_script(const char *name, char **envp)
cp();
#ifndef HAVE_MINGW
cp();
#ifndef HAVE_MINGW
- len = asprintf(&scriptname, "\"%s/%s\"", confbase, name);
+ len =
x
asprintf(&scriptname, "\"%s/%s\"", confbase, name);
#else
#else
- len = asprintf(&scriptname, "\"%s/%s.bat\"", confbase, name);
+ len =
x
asprintf(&scriptname, "\"%s/%s.bat\"", confbase, name);
#endif
if(len < 0)
return false;
scriptname[len - 1] = '\0';
#endif
if(len < 0)
return false;
scriptname[len - 1] = '\0';
+#ifndef HAVE_TUNEMU
/* First check if there is a script */
/* First check if there is a script */
- if(stat(scriptname + 1, &s))
+ if(stat(scriptname + 1, &s)) {
+ free(scriptname);
return true;
return true;
+ }
+#endif
ifdebug(STATUS) logger(LOG_INFO, _("Executing script %s"), name);
ifdebug(STATUS) logger(LOG_INFO, _("Executing script %s"), name);
@@
-582,7
+589,7
@@
void setup_signals(void)
/* Set a default signal handler for every signal, errors will be
ignored. */
/* Set a default signal handler for every signal, errors will be
ignored. */
- for(i =
0
; i < NSIG; i++) {
+ for(i =
1
; i < NSIG; i++) {
if(!do_detach)
act.sa_handler = SIG_DFL;
else
if(!do_detach)
act.sa_handler = SIG_DFL;
else