projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3909b8e
)
Remove last references to the global variable "running".
author
Guus Sliepen
<guus@tinc-vpn.org>
Fri, 18 May 2007 09:51:54 +0000
(09:51 +0000)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Fri, 18 May 2007 09:51:54 +0000
(09:51 +0000)
src/net.c
patch
|
blob
|
history
src/process.c
patch
|
blob
|
history
diff --git
a/src/net.c
b/src/net.c
index
b47c702
..
5638e64
100644
(file)
--- a/
src/net.c
+++ b/
src/net.c
@@
-39,8
+39,6
@@
#include "subnet.h"
#include "xalloc.h"
#include "subnet.h"
#include "xalloc.h"
-volatile bool running = false;
-
/* Purge edges and subnets of unreachable nodes. Use carefully. */
static void purge(void)
/* Purge edges and subnets of unreachable nodes. Use carefully. */
static void purge(void)
@@
-278,13
+276,8
@@
void handle_meta_connection_data(int fd, short events, void *data)
}
}
}
}
-static void dummy(int a, short b, void *c)
-{
-}
-
static void sigterm_handler(int signal, short events, void *data) {
logger(LOG_NOTICE, _("Got %s signal"), strsignal(signal));
static void sigterm_handler(int signal, short events, void *data) {
logger(LOG_NOTICE, _("Got %s signal"), strsignal(signal));
- running = false;
event_loopexit(NULL);
}
event_loopexit(NULL);
}
diff --git
a/src/process.c
b/src/process.c
index
b8c5420
..
44a4c76
100644
(file)
--- a/
src/process.c
+++ b/
src/process.c
@@
-42,7
+42,6
@@
extern char *identname;
extern char *pidfilename;
extern char **g_argv;
extern bool use_logfile;
extern char *pidfilename;
extern char **g_argv;
extern bool use_logfile;
-extern volatile bool running;
sigset_t emptysigset;
sigset_t emptysigset;
@@
-164,19
+163,11
@@
DWORD WINAPI controlhandler(DWORD request, DWORD type, LPVOID boe, LPVOID bah) {
return ERROR_CALL_NOT_IMPLEMENTED;
}
return ERROR_CALL_NOT_IMPLEMENTED;
}
- if(running) {
- running = false;
- status.dwWaitHint = 30000;
- status.dwCurrentState = SERVICE_STOP_PENDING;
- SetServiceStatus(statushandle, &status);
- return NO_ERROR;
- } else {
- status.dwWaitHint = 0;
- status.dwCurrentState = SERVICE_STOPPED;
- SetServiceStatus(statushandle, &status);
- exit(1);
- }
-
+ event_loopexit(NULL);
+ status.dwWaitHint = 30000;
+ status.dwCurrentState = SERVICE_STOP_PENDING;
+ SetServiceStatus(statushandle, &status);
+ return NO_ERROR;
}
VOID WINAPI run_service(DWORD argc, LPTSTR* argv)
}
VOID WINAPI run_service(DWORD argc, LPTSTR* argv)