X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fpokey%2Fpokey.c;h=d312d43d6ec8f22ca323913667b81df6878b22d1;hp=a2385a7f74a5996d75a4ffb955ea9f0b5619378a;hb=246ce12c92ccc7badbb8c8c9a88fa03a7de9811f;hpb=a5b3ec41214ac8aea9b82734f92b5953e04a0c09 diff --git a/src/pokey/pokey.c b/src/pokey/pokey.c index a2385a7f..d312d43d 100644 --- a/src/pokey/pokey.c +++ b/src/pokey/pokey.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: pokey.c,v 1.1 2002/04/11 14:23:56 zarq Exp $ + $Id: pokey.c,v 1.2 2002/04/13 11:21:01 zarq Exp $ */ #include "config.h" @@ -56,6 +56,7 @@ #include "process.h" #include "protocol.h" #include "subnet.h" +#include "logging.h" #include "system.h" @@ -274,7 +275,8 @@ void make_names(void) if(!confbase) asprintf(&confbase, "%s/tinc/%s", CONFDIR, netname); else - log_message(LOG_INFO, _("Both netname and configuration directory given, using the latter...")); + log(0, LOG_INFO, + _("Both netname and configuration directory given, using the latter...")); if(!identname) asprintf(&identname, "tinc.%s", netname); } @@ -317,22 +319,19 @@ main(int argc, char **argv, char **envp) if(show_help) usage(0); + log_add_hook(log_default); + gnome_init("Pokey", "0.0", 1, fake_argv); glade_init(); - xml = glade_xml_new("pokey.glade", NULL); - - if (!xml) { - g_warning("something bad happened while creating the interface"); - return 1; - } + xml = glade_xml_new("pokey.glade", "MainWindow"); -/* if(geteuid()) */ -/* { */ -/* fprintf(stderr, _("You must be root to run this program.\n")); */ -/* return 1; */ -/* } */ + if (!xml) + { + fprintf(stderr, _("Something bad happened while creating the interface.\n")); + exit(1); + } g_argv = argv; @@ -367,7 +366,8 @@ cp cleanup_and_exit(1); } - log_message(LOG_ERR, _("Unrecoverable error")); + log(0, LOG_ERR, + _("Unrecoverable error")); cp_trace(); return 1;