Fix retrying outgoing connections.
[tinc] / src / tincd.c
index 54ee232..9730e21 100644 (file)
@@ -78,6 +78,7 @@ bool use_logfile = false;
 
 char *identname = NULL;                                /* program name for syslog */
 char *pidfilename = NULL;                      /* pid file location */
+char *controlfilename = NULL;                  /* pid file location */
 char *logfilename = NULL;                      /* log file location */
 char **g_argv;                                 /* a copy of the cmdline arguments */
 
@@ -378,6 +379,8 @@ static void make_names(void)
        if(!pidfilename)
                asprintf(&pidfilename, LOCALSTATEDIR "/run/%s.pid", identname);
 
+       asprintf(&controlfilename, LOCALSTATEDIR "/run/%s.control", identname);
+
        if(!logfilename)
                asprintf(&logfilename, LOCALSTATEDIR "/log/%s.log", identname);
 
@@ -463,7 +466,7 @@ int main(int argc, char **argv)
        if(!read_server_config())
                return 1;
 
-       if(event_init() < 0) {
+       if(!event_init()) {
                logger(LOG_ERR, _("Error initializing libevent!"));
                return 1;
        }