diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-01-09 12:36:58 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-01-09 12:36:58 +0000 |
commit | 751bbec3f68b51a8db3160985b62e2d0f7ea969c (patch) | |
tree | cf7d7fef9db67eacd9c835605fa617513fbaff4c | |
parent | 3709666344736da68472f754ac52edc356039058 (diff) |
handle call rejection properly
-rw-r--r-- | audio/headset.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/audio/headset.c b/audio/headset.c index 1a884b65..cef32250 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -252,15 +252,17 @@ static int terminate_call(struct device *device, const char *buf) AUDIO_HEADSET_INTERFACE, "CallTerminated", DBUS_TYPE_INVALID); + err = headset_send(hs, "\r\nOK\r\n"); + if (err < 0) + return err; + if (hs->ring_timer) { g_source_remove(hs->ring_timer); hs->ring_timer = 0; + /*+CIEV: (callsetup = 0)*/ + return headset_send(hs, "\r\n+CIEV:3, 0\r\n"); } - err = headset_send(hs, "\r\nOK\r\n"); - if (err < 0) - return err; - /*+CIEV: (call = 0)*/ return headset_send(hs, "\r\n+CIEV:2, 0\r\n"); } |