diff options
| author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-24 18:01:59 +0300 | 
|---|---|---|
| committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-24 18:01:59 +0300 | 
| commit | f30452e5bb796f869eff945402ecf1d4fedb8077 (patch) | |
| tree | 72344469c3fc52e902dd530546bac51629087c55 /audio/headset.c | |
| parent | a5883ecb1aa94b09bcf0e7ce4184d262027c5939 (diff) | |
Clear pending ring if calling is stopped before SCO is up
Diffstat (limited to 'audio/headset.c')
| -rw-r--r-- | audio/headset.c | 15 | 
1 files changed, 12 insertions, 3 deletions
| diff --git a/audio/headset.c b/audio/headset.c index 648185b5..cb11e40a 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -2462,14 +2462,23 @@ int telephony_incoming_call_ind(const char *number, int type)  int telephony_calling_stopped_ind(void)  { +	struct audio_device *dev; +  	if (!active_devices)  		return -ENODEV; -	if (!ag.ring_timer) +	/* In case SCO isn't fully up yet */ +	dev = active_devices->data; + +	if (!dev->headset->pending_ring && !ag.ring_timer)  		return -EINVAL; -	g_source_remove(ag.ring_timer); -	ag.ring_timer = 0; +	dev->headset->pending_ring = FALSE; + +	if (ag.ring_timer) { +		g_source_remove(ag.ring_timer); +		ag.ring_timer = 0; +	}  	return 0;  } | 
