aboutsummaryrefslogtreecommitdiff
path: root/src/ka-dialog.c
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-02-24 20:00:30 +0100
committerGuido Günther <agx@sigxcpu.org>2011-02-24 20:00:30 +0100
commit2a51379a21903f4df0b43d0c83b670b66fbc8e4a (patch)
treebdf4636fa16aa09de3b7ae565a410d49c0cf2d4c /src/ka-dialog.c
parentNew upstream version 2.91.6 (diff)
downloadkrb5-auth-dialog-2a51379a21903f4df0b43d0c83b670b66fbc8e4a.tar.gz
krb5-auth-dialog-2a51379a21903f4df0b43d0c83b670b66fbc8e4a.tar.bz2
krb5-auth-dialog-2a51379a21903f4df0b43d0c83b670b66fbc8e4a.zip
New upstream version 2.91.90
Diffstat (limited to 'src/ka-dialog.c')
-rw-r--r--src/ka-dialog.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/ka-dialog.c b/src/ka-dialog.c
index ce86367..3114f49 100644
--- a/src/ka-dialog.c
+++ b/src/ka-dialog.c
@@ -502,6 +502,15 @@ credentials_expiring (gpointer *data)
}
+/* run once, then terminate the timer */
+static gboolean
+credentials_expiring_once (gpointer *data)
+{
+ credentials_expiring(data);
+ return FALSE;
+}
+
+
/*
* set ticket options by looking at krb5.conf and gconf
*/
@@ -1056,9 +1065,10 @@ main (int argc, char *argv[])
const char *help_msg = "Run '" PACKAGE " --help' to see a full list of available command line options";
const GOptionEntry options [] = {
{"auto", 'a', 0, G_OPTION_ARG_NONE, &run_auto,
- "Only run if an initialized ccache is found (default)", NULL},
+ "Only run if an initialized ccache is found", NULL},
+ /* accepted for compatibility only */
{"always", 'A', 0, G_OPTION_ARG_NONE, &run_always,
- "Always run", NULL},
+ "Always run (default)", NULL},
{ NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL }
};
GFileMonitor *monitor = NULL;
@@ -1085,10 +1095,7 @@ main (int argc, char *argv[])
if (!ka_dbus_connect (&status))
exit(status);
- if (run_always && !run_auto) {
- always_run = TRUE;
- }
-
+ always_run = !run_auto;
if (using_krb5 () || always_run) {
g_set_application_name (KA_NAME);
@@ -1098,6 +1105,7 @@ main (int argc, char *argv[])
ka_nm_init();
g_timeout_add_seconds (CREDENTIAL_CHECK_INTERVAL, (GSourceFunc)credentials_expiring, applet);
+ g_idle_add ((GSourceFunc)credentials_expiring_once, applet);
monitor = monitor_ccache (applet);
ka_dbus_service(applet);
bgstack15