if(show_version) {
printf("%s version %s (built %s %s, protocol %d.%d)\n", PACKAGE,
VERSION, __DATE__, __TIME__, PROT_MAJOR, PROT_MINOR);
- printf("Copyright (C) 1998-2012 Ivo Timmermans, Guus Sliepen and others.\n"
+ printf("Copyright (C) 1998-2013 Ivo Timmermans, Guus Sliepen and others.\n"
"See the AUTHORS file for a complete list.\n\n"
"tinc comes with ABSOLUTELY NO WARRANTY. This is free software,\n"
"and you are welcome to redistribute it under certain conditions;\n"
/* Setup sockets and open device. */
if(!setup_network())
- goto end_nonet;
-
- if(!init_control())
- goto end_nonet;
-
- /* Initiate all outgoing connections. */
-
- try_outgoing_connections();
+ goto end;
/* Change process priority */
/* Start main loop. It only exits when tinc is killed. */
+ logger(DEBUG_ALWAYS, LOG_NOTICE, "Ready");
+
+ try_outgoing_connections();
+
status = main_loop();
/* Shutdown properly. */
if(debug_level >= DEBUG_CONNECTIONS)
devops.dump_stats();
- close_network_connections();
-
end:
- exit_control();
+ close_network_connections();
-end_nonet:
logger(DEBUG_ALWAYS, LOG_NOTICE, "Terminating");
free(priority);