From c33ebb03a47eed939bb901daf9ac7e0edadb54d3 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 2 May 2018 10:39:47 +0200 Subject: [PATCH] Move default timeout to main binary Rather than have the default 5 seconds timeout in 2 separate locations, move the default timeout value to the binary, so as to reduce the difference between the interactive and non-interactive behaviour, and reduce confusion. https://bugs.freedesktop.org/show_bug.cgi?id=106249 --- data/geoclue.service.in | 2 +- data/org.freedesktop.GeoClue2.service.in | 2 +- src/gclue-main.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/geoclue.service.in b/data/geoclue.service.in index 812cb67..dc77b48 100644 --- a/data/geoclue.service.in +++ b/data/geoclue.service.in @@ -5,4 +5,4 @@ Description=Location Lookup Service Type=dbus BusName=org.freedesktop.GeoClue2 User=@dbus_srv_user@ -ExecStart=@libexecdir@/geoclue -t 5 +ExecStart=@libexecdir@/geoclue diff --git a/data/org.freedesktop.GeoClue2.service.in b/data/org.freedesktop.GeoClue2.service.in index ef16223..ac38e38 100644 --- a/data/org.freedesktop.GeoClue2.service.in +++ b/data/org.freedesktop.GeoClue2.service.in @@ -1,5 +1,5 @@ [D-BUS Service] Name=org.freedesktop.GeoClue2 -Exec=@libexecdir@/geoclue -t 5 +Exec=@libexecdir@/geoclue User=@dbus_srv_user@ SystemdService=geoclue.service diff --git a/src/gclue-main.c b/src/gclue-main.c index d596ffc..55db069 100644 --- a/src/gclue-main.c +++ b/src/gclue-main.c @@ -33,7 +33,7 @@ /* Commandline options */ static gboolean version = FALSE; -static gint inactivity_timeout = 0; +static gint inactivity_timeout = 5; static gboolean submit_data = FALSE; static char *submit_nick = NULL; @@ -51,7 +51,7 @@ static GOptionEntry entries[] = 0, G_OPTION_ARG_INT, &inactivity_timeout, - N_("Exit after T seconds of inactivity. Default: 0 (never)"), + N_("Exit after T seconds of inactivity, 0 for never. Default: 5"), "T" }, { "submit-data", 's', -- 2.17.0