From 84a8da774122b4fbfaeaf64299510c1a42a975ef Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 2 Jul 2015 00:10:31 +0100 Subject: [PATCH] Default autoping to 1 minute #541 --- src/config/preferences.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/config/preferences.c b/src/config/preferences.c index 7153d62b..56950e90 100644 --- a/src/config/preferences.c +++ b/src/config/preferences.c @@ -281,7 +281,11 @@ prefs_set_reconnect(gint value) gint prefs_get_autoping(void) { - return g_key_file_get_integer(prefs, PREF_GROUP_CONNECTION, "autoping", NULL); + if (!g_key_file_has_key(prefs, PREF_GROUP_CONNECTION, "autoping", NULL)) { + return 60; + } else { + return g_key_file_get_integer(prefs, PREF_GROUP_CONNECTION, "autoping", NULL); + } } void