1 | /* |
1 | /* |
2 | vped.C -- the main file for vped |
2 | vped.C -- the main file for gvpe |
3 | Copyright (C) 1998-2002 Ivo Timmermans <ivo@o2w.nl> |
3 | Copyright (C) 1998-2002 Ivo Timmermans <ivo@o2w.nl> |
4 | 2000-2002 Guus Sliepen <guus@sliepen.eu.org> |
4 | 2000-2002 Guus Sliepen <guus@sliepen.eu.org> |
5 | 2003 Marc Lehmann <pcg@goof.com> |
5 | 2003-2004 Marc Lehmann <pcg@goof.com> |
6 | |
6 | |
7 | This program is free software; you can redistribute it and/or modify |
7 | This program is free software; you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by |
8 | it under the terms of the GNU General Public License as published by |
9 | the Free Software Foundation; either version 2 of the License, or |
9 | the Free Software Foundation; either version 2 of the License, or |
10 | (at your option) any later version. |
10 | (at your option) any later version. |
… | |
… | |
22 | #include "config.h" |
22 | #include "config.h" |
23 | |
23 | |
24 | #include <cstdio> |
24 | #include <cstdio> |
25 | #include <cstring> |
25 | #include <cstring> |
26 | #include <cstdlib> |
26 | #include <cstdlib> |
27 | #include <clocale> |
27 | #include <locale.h> |
28 | |
28 | |
29 | #include <errno.h> |
29 | #include <errno.h> |
30 | #include <fcntl.h> |
30 | #include <fcntl.h> |
31 | #include <getopt.h> |
31 | #include <getopt.h> |
32 | #include <signal.h> |
32 | #include <signal.h> |
… | |
… | |
266 | |
266 | |
267 | setup_signals (); |
267 | setup_signals (); |
268 | |
268 | |
269 | if (!network.setup ()) |
269 | if (!network.setup ()) |
270 | { |
270 | { |
271 | iom.loop (); |
271 | io_manager::loop (); |
272 | cleanup_and_exit (EXIT_FAILURE); |
272 | cleanup_and_exit (EXIT_FAILURE); |
273 | } |
273 | } |
274 | |
274 | |
275 | slog (L_ERR, _("unable to setup network, unrecoverable error, exiting.")); |
275 | slog (L_ERR, _("unable to setup network, unrecoverable error, exiting.")); |
276 | cleanup_and_exit (EXIT_FAILURE); |
276 | cleanup_and_exit (EXIT_FAILURE); |