From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 3/3 v3] hfp_ag_bluez5: use codec negotiation
Date: Mon, 19 Oct 2015 09:21:56 -0500 [thread overview]
Message-ID: <5624FC84.3000007@gmail.com> (raw)
In-Reply-To: <1444975200-19682-3-git-send-email-simon.fels@canonical.com>
[-- Attachment #1: Type: text/plain, Size: 962 bytes --]
Hi Simon,
<snip>
> static void hfp_card_connect(struct ofono_handsfree_card *card,
> ofono_handsfree_card_connect_cb_t cb,
> void *data)
> {
> + int err;
> + struct ofono_emulator *em = ofono_handsfree_card_get_data(card);
> + struct cb_data *cbd;
> +
> DBG("");
> - ofono_handsfree_card_connect_sco(card);
> +
> + cbd = cb_data_new(cb, data);
> +
> + /*
> + * The emulator core will take care if the remote side supports
> + * codec negotiation or not.
> + */
> + err = ofono_emulator_start_codec_negotiation(em, 0,
> + codec_negotiation_done_cb, cbd);
In the case of HF not supporting codec negotiation, you leak cbd here...
> + if (err < 0) {
> + CALLBACK_WITH_FAILURE(cb, data);
> +
> + g_free(cbd);
> + return;
> + }
> +
> + /*
> + * We hand over to the emulator core here to establish the
> + * SCO connection once the codec is negotiated
> + * */
> }
>
Regards,
-Denis
next prev parent reply other threads:[~2015-10-19 14:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-16 5:59 [PATCH 1/3 v2] hfp_ag_bluez5: Add initial handsfree audio driver Simon Fels
2015-10-16 5:59 ` [PATCH 2/3 v2] emulator: add codec negotiation support Simon Fels
2015-10-19 14:20 ` Denis Kenzior
2015-10-16 6:00 ` [PATCH 3/3 v3] hfp_ag_bluez5: use codec negotiation Simon Fels
2015-10-19 14:21 ` Denis Kenzior [this message]
2015-10-19 14:22 ` [PATCH 1/3 v2] hfp_ag_bluez5: Add initial handsfree audio driver Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5624FC84.3000007@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.