diff options
author | Denis Kenzior <denkenz@gmail.com> | 2015-11-12 13:42:41 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2015-11-12 13:42:41 -0600 |
commit | 4cbc608e9e0346e379352a0fcc82c697d37f518a (patch) | |
tree | f7f019dd11d921d67d791740646799c0829e38c2 /drivers | |
parent | 9ac09d2605c21427d6038e4f7b890f4e8e21b523 (diff) | |
download | ofono-4cbc608e9e0346e379352a0fcc82c697d37f518a.tar.bz2 |
rilmodem: Implement send_one_dtmf inline
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/rilmodem/voicecall.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/rilmodem/voicecall.c b/drivers/rilmodem/voicecall.c index 21912698..f4184290 100644 --- a/drivers/rilmodem/voicecall.c +++ b/drivers/rilmodem/voicecall.c @@ -556,6 +556,7 @@ static void ril_send_dtmf_cb(struct ril_msg *message, gpointer user_data) static void send_one_dtmf(struct ril_voicecall_data *vd) { struct parcel rilp; + char ril_dtmf[2]; if (vd->tone_pending == TRUE) return; /* RIL request pending */ @@ -563,7 +564,15 @@ static void send_one_dtmf(struct ril_voicecall_data *vd) if (strlen(vd->tone_queue) == 0) return; /* nothing to send */ - g_ril_request_dtmf(vd->ril, vd->tone_queue[0], &rilp); + parcel_init(&rilp); + + /* Ril wants just one character, but we need to send as string */ + ril_dtmf[0] = vd->tone_queue[0]; + ril_dtmf[1] = '\0'; + + parcel_w_string(&rilp, ril_dtmf); + + g_ril_append_print_buf(vd->ril, "(%s)", ril_dtmf); g_ril_send(vd->ril, RIL_REQUEST_DTMF, &rilp, ril_send_dtmf_cb, vd, NULL); |