projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Call event_init() after detaching.
[tinc]
/
src
/
tincd.c
diff --git
a/src/tincd.c
b/src/tincd.c
index
3cbac4b
..
9f65bbe
100644
(file)
--- a/
src/tincd.c
+++ b/
src/tincd.c
@@
-382,11
+382,6
@@
int main(int argc, char **argv) {
openlogger("tinc", use_logfile?LOGMODE_FILE:LOGMODE_STDERR);
openlogger("tinc", use_logfile?LOGMODE_FILE:LOGMODE_STDERR);
- if(!event_init()) {
- logger(DEBUG_ALWAYS, LOG_ERR, "Error initializing libevent!");
- return 1;
- }
-
g_argv = argv;
if(getenv("LISTEN_PID") && atoi(getenv("LISTEN_PID")) == getpid())
g_argv = argv;
if(getenv("LISTEN_PID") && atoi(getenv("LISTEN_PID")) == getpid())
@@
-439,6
+434,11
@@
int main2(int argc, char **argv) {
}
#endif
}
#endif
+ if(!event_init()) {
+ logger(DEBUG_ALWAYS, LOG_ERR, "Error initializing libevent!");
+ return 1;
+ }
+
/* Setup sockets and open device. */
if(!setup_network())
/* Setup sockets and open device. */
if(!setup_network())