diff options
author | Petri Gynther <pgynther@google.com> | 2014-04-04 16:02:01 -0700 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-04-05 09:47:15 +0300 |
commit | ddecba5b5daed6066f900df9b8750f15f1a78298 (patch) | |
tree | 5fdeb269fd41f2d86adf1412c0710659c9841981 /profiles | |
parent | 6b09f55b0910784857eb5c460317a2ea9e93bb71 (diff) | |
download | bluez-ddecba5b5daed6066f900df9b8750f15f1a78298.tar.gz |
input: Fix input.conf IdleTimeout handling
IdleTimeout is an optional config item in input.conf. Don't complain
if it is not defined. Instead, do the opposite and show its value in
debug logs only when it is defined.
Diffstat (limited to 'profiles')
-rw-r--r-- | profiles/input/manager.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/profiles/input/manager.c b/profiles/input/manager.c index 6ef83f417..23e739a58 100644 --- a/profiles/input/manager.c +++ b/profiles/input/manager.c @@ -99,13 +99,12 @@ static int input_init(void) int idle_timeout; idle_timeout = g_key_file_get_integer(config, "General", - "IdleTimeout", &err); - if (err) { - DBG("input.conf: %s", err->message); - g_error_free(err); - } - - input_set_idle_timeout(idle_timeout * 60); + "IdleTimeout", &err); + if (!err) { + DBG("input.conf: IdleTimeout=%d", idle_timeout); + input_set_idle_timeout(idle_timeout * 60); + } else + g_clear_error(&err); } btd_profile_register(&input_profile); |