From 7ce5ece4277611374b57e63fb3168e1bb04a22c7 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 24 Oct 2008 14:54:14 +0300 Subject: Remove the ring timer imediately when ATA is received --- audio/headset.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/audio/headset.c b/audio/headset.c index dffbc924..7d5fb935 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -744,12 +744,11 @@ static int button_press(struct audio_device *device, const char *buf) int telephony_answer_call_rsp(void *telephony_device, cme_error_t err) { - struct audio_device *device = telephony_device; - struct headset *hs = device->headset; - - if (err != CME_ERROR_NONE) - return telephony_generic_rsp(telephony_device, err); + return telephony_generic_rsp(telephony_device, err); +} +static int answer_call(struct audio_device *device, const char *buf) +{ if (ag.ring_timer) { g_source_remove(ag.ring_timer); ag.ring_timer = 0; @@ -760,11 +759,6 @@ int telephony_answer_call_rsp(void *telephony_device, cme_error_t err) ag.number = NULL; } - return headset_send(hs, "\r\nOK\r\n"); -} - -static int answer_call(struct audio_device *device, const char *buf) -{ telephony_answer_call_req(device); return 0; -- cgit