diff -urN firestarter-1.0.1/firestarter.console firestarter-1.0.1-gentoo/firestarter.console --- firestarter-1.0.1/firestarter.console 2004-12-13 12:49:04.000000000 -0500 +++ firestarter-1.0.1-gentoo/firestarter.console 2004-12-17 09:13:34.000000000 -0500 @@ -1,4 +1,4 @@ USER=root FALLBACK=true -PROGRAM=%{_sbindir}/firestarter +PROGRAM=/usr/bin/firestarter SESSION=true diff -urN firestarter-1.0.1/src/firestarter.c firestarter-1.0.1-gentoo/src/firestarter.c --- firestarter-1.0.1/src/firestarter.c 2004-12-13 12:49:04.000000000 -0500 +++ firestarter-1.0.1-gentoo/src/firestarter.c 2004-12-17 09:53:32.512715655 -0500 @@ -20,6 +20,7 @@ #include #include #include +#include #include "globals.h" #include "firestarter.h" @@ -326,6 +327,18 @@ return TRUE; } +static void +sig_usr1_handler (int signo G_GNUC_UNUSED) +{ + /* reestablish handler */ + signal(SIGUSR1, sig_usr1_handler); + + /* add an idle call to the sync function */ + g_idle_add(status_sync_idle_oneshot, NULL); + + return; +} + /* [ main ] * The main function, this is where it all begins and ends */ @@ -406,7 +419,9 @@ gui_construct (); /* Attach a timeout that keeps the GUI fw status in sync with userland changes */ status_sync_timeout (NULL); /* Do one immediate refresh */ - g_timeout_add (5000, status_sync_timeout, NULL); + g_timeout_add (30000, status_sync_timeout, NULL); + /* connect a signal to allow for external sync requests */ + signal (SIGUSR1, sig_usr1_handler); /* Initialize the system log file polling function */ open_logfile ((gchar *)get_system_log_path ()); diff -urN firestarter-1.0.1/src/statusview.c firestarter-1.0.1-gentoo/src/statusview.c --- firestarter-1.0.1/src/statusview.c 2004-12-13 12:49:04.000000000 -0500 +++ firestarter-1.0.1-gentoo/src/statusview.c 2004-12-17 08:21:47.000000000 -0500 @@ -518,6 +518,18 @@ current_status = status; } +/* [ status_sync_idle_oneshot ] + * Correct the GUI state in case outside factors change the firewall state + */ +gint +status_sync_idle_oneshot (gpointer data) +{ + /* pass on the call */ + status_sync_timeout(data); + + return FALSE; +} + /* [ status_sync_timeout ] * Correct the GUI state in case outside factors change the firewall state */ diff -urN firestarter-1.0.1/src/statusview.h firestarter-1.0.1-gentoo/src/statusview.h --- firestarter-1.0.1/src/statusview.h 2004-12-13 12:49:04.000000000 -0500 +++ firestarter-1.0.1-gentoo/src/statusview.h 2004-12-17 07:59:21.000000000 -0500 @@ -37,6 +37,7 @@ void status_event_out_inc (void); void status_serious_event_out_inc (void); +gint status_sync_idle_oneshot (gpointer data); gint status_sync_timeout (gpointer data); void status_lookup_selected_connection (void);