--- gvpe/src/gvpe.C 2005/04/26 00:55:56 1.8 +++ gvpe/src/gvpe.C 2007/12/01 23:35:31 1.12 @@ -50,7 +50,7 @@ #include "slog.h" #include "util.h" #include "vpn.h" -#include "iom.h" +#include "ev_cpp.h" static loglevel llevel = L_NONE; @@ -92,7 +92,7 @@ " -L, --mlock Lock tinc into main memory.\n" " --help Display this help and exit.\n" " --version Output version information and exit.\n\n")); - printf (_("Report bugs to .\n")); + printf (_("Report bugs to .\n")); } exit (status); @@ -163,14 +163,14 @@ sigterm_handler (int a) { network.events |= vpn::EVENT_SHUTDOWN; - network.event.start (0); + network.event.start (); } RETSIGTYPE sighup_handler (int a) { network.events |= vpn::EVENT_RECONNECT; - network.event.start (0); + network.event.start (); } RETSIGTYPE @@ -222,11 +222,11 @@ if (show_version) { - printf (_("%s version %s (built %s %s, protocol %d.%d)\n"), get_identity (), + printf (_("%s version %s (built %s %s, protocol version %d.%d)\n"), get_identity (), VERSION, __DATE__, __TIME__, PROTOCOL_MAJOR, PROTOCOL_MINOR); printf (_("Built with kernel interface %s/%s.\n"), IFTYPE, IFSUBTYPE); printf (_ - ("Copyright (C) 2003 Marc Lehmann and others.\n" + ("Copyright (C) 2003 Marc Lehmann 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" @@ -254,6 +254,12 @@ argc--; } + if (!ev_default_loop (0)) + { + slog (L_ERR, _("unable to initialise the event loop (bad $LIBEV_METHODS?)")); + exit (EXIT_FAILURE); + } + { configuration_parser (conf, true, argc, argv); } @@ -276,7 +282,7 @@ if (!network.setup ()) { - io_manager::loop (); + ev_loop (EV_DEFAULT_ 0); cleanup_and_exit (EXIT_FAILURE); }