summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-12-16 15:30:34 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2008-12-16 15:30:34 +0200
commitbf64c9b32825beba09cd0e96fc93ce9a4cf4f352 (patch)
tree079acc89476aea0b8a6f84ca7ef51832dd57f08a /src/main.c
parent567d6494208ceae0d2101df36e7c285ad998242d (diff)
Implement InitiallyPowered config option
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index af3368e9..c53454e9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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 |