From a104e5ff05aa758b5499b316d1923f1c83915e55 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 30 Jan 2008 12:19:56 +0000 Subject: Use snd_config_get_bool for autoconnect --- audio/pcm_bluetooth.c | 8 +++++--- 1 file 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; } -- cgit