diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-04-15 22:38:11 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-04-15 22:38:11 +0300 |
commit | f1af647c4beee2c5f13f454516a9f0d96aacf6ab (patch) | |
tree | bf5fb2a2b3c968cfbad2d1bba27ac30999e922ef | |
parent | 8cb3371db458e62117c316c22e2132585ed019d8 (diff) | |
download | bluez-f1af647c4beee2c5f13f454516a9f0d96aacf6ab.tar.gz |
Return proper error if HFP indicators aren't initialized
-rw-r--r-- | audio/headset.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/audio/headset.c b/audio/headset.c index a14712098..c8a542148 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -402,6 +402,11 @@ static int report_indicators(struct audio_device *device, const char *buf) if (strlen(buf) < 8) return -EINVAL; + if (ag.indicators == NULL) { + error("HFP AG indicators not initialized"); + return headset_send(hs, "\r\nERROR\r\n"); + } + if (buf[7] == '=') str = indicator_ranges(ag.indicators); else |