summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-10-09 18:25:34 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2008-10-09 18:25:34 +0200
commit1613e8c2180952a5f312071acc9076772a3e2556 (patch)
tree1837731d57335292a1ae3bbfdf9dac25e824a9c3 /audio
parent52e257bcbf35bf7541d87ae60da9e17d60a72303 (diff)
Fix response and hold response logig
Diffstat (limited to 'audio')
-rw-r--r--audio/headset.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/audio/headset.c b/audio/headset.c
index 9c575fc0..44b1f801 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -793,14 +793,15 @@ static int response_and_hold(struct audio_device *device, const char *buf)
if (strlen(buf) < 8)
return -EINVAL;
- if (buf[7] == '=')
+ if (buf[7] == '=') {
telephony_response_and_hold_req(device, atoi(&buf[8]) < 0);
- else if (ag.rh >= 0)
- return headset_send(hs, "\r\n+BTRH:%d\r\n", ag.rh);
- else
- return headset_send(hs, "\r\nOK\r\n", ag.rh);
+ return 0;
+ }
- return 0;
+ if (ag.rh >= 0)
+ headset_send(hs, "\r\n+BTRH:%d\r\n", ag.rh);
+
+ return headset_send(hs, "\r\nOK\r\n", ag.rh);
}
int telephony_last_dialed_number_rsp(void *telephony_device, cme_error_t err)