diff options
| author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-01-30 12:19:56 +0000 | 
|---|---|---|
| committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-01-30 12:19:56 +0000 | 
| commit | a104e5ff05aa758b5499b316d1923f1c83915e55 (patch) | |
| tree | 8918b8a725473b5bfd891710b0c4ffac6b632e1a /audio/pcm_bluetooth.c | |
| parent | d1c580e150dc4982c9e91b70842aab5ba71325eb (diff) | |
Use snd_config_get_bool for autoconnect
Diffstat (limited to 'audio/pcm_bluetooth.c')
| -rw-r--r-- | audio/pcm_bluetooth.c | 8 | 
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;  		} | 
