If the AG receives AT+BAC as a response to an unsolicited +BCS, it
will resend +BCS based on new list of available codecs.
---
 src/emulator.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/emulator.c b/src/emulator.c
index a228df4..7f6604a 100644
--- a/src/emulator.c
+++ b/src/emulator.c
@@ -541,6 +541,7 @@ static void bac_cb(GAtServer *server, GAtServerRequestType 
type,
        struct ofono_emulator *em = user_data;
        GAtResultIter iter;
        int codec, codecs = 0;
+       gboolean bcs = em->bcs;
 
        em->bcs = FALSE;
 
@@ -558,6 +559,11 @@ static void bac_cb(GAtServer *server, GAtServerRequestType 
type,
                em->r_codecs = codecs;
 
                g_at_server_send_final(server, G_AT_SERVER_RESULT_OK);
+
+               if (bcs)
+                       em->audiosetup_source = g_timeout_add_seconds(0,
+                                               setup_codec_connection, em);
+
                break;
 
        default:
-- 
1.7.9.5

_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to