diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-12-16 15:30:34 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-12-16 15:30:34 +0200 |
commit | bf64c9b32825beba09cd0e96fc93ce9a4cf4f352 (patch) | |
tree | 079acc89476aea0b8a6f84ca7ef51832dd57f08a /src/main.c | |
parent | 567d6494208ceae0d2101df36e7c285ad998242d (diff) |
Implement InitiallyPowered config option
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -96,6 +96,7 @@ static void parse_config(GKeyFile *config) GError *err = NULL; char *str; int val; + gboolean boolean; if (!config) return; @@ -173,6 +174,16 @@ static void parse_config(GKeyFile *config) main_opts.inqmode = val; } + boolean = g_key_file_get_boolean(config, "General", + "InitiallyPowered", + &err); + if (err) { + debug("%s", err->message); + g_clear_error(&err); + } else if (boolean == FALSE) + main_opts.mode = MODE_OFF; + + main_opts.link_mode = HCI_LM_ACCEPT; main_opts.link_policy = HCI_LP_RSWITCH | HCI_LP_SNIFF | |