diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-12-22 15:08:36 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-12-22 15:08:36 +0200 |
commit | 26b23c817fbc00e6d4af1bcd7f1ef2db2819d9ff (patch) | |
tree | 01135151fe78a4bb5548842b7550fe1dfd72e0e4 /src/main.c | |
parent | f463bec3023ba2b9eb44f2f72f21fdb66a06c826 (diff) |
Implement RememberPowered config option
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -175,6 +175,14 @@ static void parse_config(GKeyFile *config) } else if (boolean == FALSE) main_opts.mode = MODE_OFF; + boolean = g_key_file_get_boolean(config, "General", + "RememberPowered", &err); + if (err) { + debug("%s", err->message); + g_clear_error(&err); + } else if (boolean == FALSE) + main_opts.remember_powered = boolean; + str = g_key_file_get_string(config, "General", "DeviceID", &err); if (err) { debug("%s", err->message); @@ -532,6 +540,7 @@ static void init_defaults(void) main_opts.mode = MODE_CONNECTABLE; main_opts.name = g_strdup("BlueZ"); main_opts.discovto = HCID_DEFAULT_DISCOVERABLE_TIMEOUT; + main_opts.remember_powered = TRUE; if (gethostname(main_opts.host_name, sizeof(main_opts.host_name) - 1) < 0) strcpy(main_opts.host_name, "noname"); |