diff options
author | Philippe De Swert <philippe.deswert@nomovok.com> | 2017-10-31 10:39:34 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2017-11-03 13:27:22 -0500 |
commit | 57b1afc2e763e930351cba615b3ad24a2371514a (patch) | |
tree | 9aceef1c9ebe87a4c790a94c30da51a935d066e8 /drivers/hfpmodem | |
parent | f58e7685b0078df470300b99cd89fb9b3c45d1c0 (diff) | |
download | ofono-57b1afc2e763e930351cba615b3ad24a2371514a.tar.gz |
hfpmodem: Send last call dialled request
Handle the last call dialled request and send the required AT+BDLN command
for bluetooth HFP profile.
Diffstat (limited to 'drivers/hfpmodem')
-rw-r--r-- | drivers/hfpmodem/voicecall.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c index ffdf4b7b..b1252f10 100644 --- a/drivers/hfpmodem/voicecall.c +++ b/drivers/hfpmodem/voicecall.c @@ -404,6 +404,23 @@ static void hfp_dial(struct ofono_voicecall *vc, CALLBACK_WITH_FAILURE(cb, data); } +static void hfp_dial_last(struct ofono_voicecall *vc, ofono_voicecall_cb_t cb, + void *data) +{ + struct voicecall_data *vd = ofono_voicecall_get_data(vc); + struct cb_data *cbd = cb_data_new(cb, data); + + cbd->user = vc; + + if (g_at_chat_send(vd->chat, "AT+BLDN", none_prefix, + atd_cb, cbd, g_free) > 0) + return; + + g_free(cbd); + + CALLBACK_WITH_FAILURE(cb, data); + +} static void hfp_template(const char *cmd, struct ofono_voicecall *vc, GAtResultFunc result_cb, unsigned int affected_types, ofono_voicecall_cb_t cb, void *data) @@ -1268,6 +1285,7 @@ static struct ofono_voicecall_driver driver = { .probe = hfp_voicecall_probe, .remove = hfp_voicecall_remove, .dial = hfp_dial, + .dial_last = hfp_dial_last, .answer = hfp_answer, .hangup_active = hfp_hangup, .hold_all_active = hfp_hold_all_active, |