summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-01-30 12:19:56 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2008-01-30 12:19:56 +0000
commita104e5ff05aa758b5499b316d1923f1c83915e55 (patch)
tree8918b8a725473b5bfd891710b0c4ffac6b632e1a
parentd1c580e150dc4982c9e91b70842aab5ba71325eb (diff)
Use snd_config_get_bool for autoconnect
-rw-r--r--audio/pcm_bluetooth.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/audio/pcm_bluetooth.c b/audio/pcm_bluetooth.c
index 2ecd1680..e3238b9c 100644
--- a/audio/pcm_bluetooth.c
+++ b/audio/pcm_bluetooth.c
@@ -1286,13 +1286,15 @@ static int bluetooth_parse_config(snd_config_t *conf,
continue;
if (strcmp(id, "autoconnect") == 0) {
- if (snd_config_get_string(n, &value) < 0) {
+ int b;
+
+ b = snd_config_get_bool(n);
+ if (b < 0) {
SNDERR("Invalid type for %s", id);
return -EINVAL;
}
- if (strcmp(value, "no") == 0)
- bt_config->autoconnect = 0;
+ bt_config->autoconnect = b;
continue;
}