diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2010-12-12 23:03:59 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2010-12-12 23:06:16 +0200 |
commit | 401be3748717fae613041592778a3a7160fb763c (patch) | |
tree | 5369b71172f80c32fb6a5bf44423ac9b1fe01150 /audio/headset.c | |
parent | 1180011b8186f5265cf04b39b3354469ee8d03e4 (diff) | |
download | bluez-401be3748717fae613041592778a3a7160fb763c.tar.gz |
Fix cleaning up HFP state after calling telephony_exit
HFP state variables in telephony.h need to be reset when telephony_exit
is called. This is even more important now that telephony_init/exit get
called simply by toggling the adapter powered state.
Diffstat (limited to 'audio/headset.c')
-rw-r--r-- | audio/headset.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/audio/headset.c b/audio/headset.c index aaf70397..00db2ff8 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -2802,6 +2802,18 @@ int telephony_ready_ind(uint32_t features, return 0; } +int telephony_deinit(void) +{ + memset(&ag, 0, sizeof(ag)); + + ag.er_mode = 3; + ag.rh = BTRH_NOT_SUPPORTED; + + DBG("Telephony deinitialized"); + + return 0; +} + int telephony_list_current_call_ind(int idx, int dir, int status, int mode, int mprty, const char *number, int type) |