2012-03-23 15:03:47

by Mike Brudevold

[permalink] [raw]
Subject: [PATCH] avdtp: fix audio source init check

From: Michael Brudevold <[email protected]>

---
audio/avdtp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/audio/avdtp.c b/audio/avdtp.c
index cd66fd4..8b36f0b 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -1520,7 +1520,7 @@ static gboolean avdtp_setconf_cmd(struct avdtp *session, uint8_t transaction,
case AVDTP_SEP_TYPE_SINK:
if (!dev->source) {
btd_device_add_uuid(dev->btd_dev, A2DP_SOURCE_UUID);
- if (!dev->sink) {
+ if (!dev->source) {
error("Unable to get a audio source object");
err = AVDTP_BAD_STATE;
goto failed;
--
1.7.5.4



2012-03-27 11:52:29

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] avdtp: fix audio source init check

Hi Mike,

On Fri, Mar 23, 2012, Mike Brudevold wrote:
> From: Michael Brudevold <[email protected]>
>
> ---
> audio/avdtp.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/audio/avdtp.c b/audio/avdtp.c
> index cd66fd4..8b36f0b 100644
> --- a/audio/avdtp.c
> +++ b/audio/avdtp.c
> @@ -1520,7 +1520,7 @@ static gboolean avdtp_setconf_cmd(struct avdtp *session, uint8_t transaction,
> case AVDTP_SEP_TYPE_SINK:
> if (!dev->source) {
> btd_device_add_uuid(dev->btd_dev, A2DP_SOURCE_UUID);
> - if (!dev->sink) {
> + if (!dev->source) {
> error("Unable to get a audio source object");
> err = AVDTP_BAD_STATE;
> goto failed;

Applied. Thanks.

Johan

2012-03-26 14:24:25

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH] avdtp: fix audio source init check

Hi Mike,

On Fri, Mar 23, 2012 at 12:03 PM, Mike Brudevold <[email protected]> wrote:
> From: Michael Brudevold <[email protected]>
>
> ---
> ?audio/avdtp.c | ? ?2 +-
> ?1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/audio/avdtp.c b/audio/avdtp.c
> index cd66fd4..8b36f0b 100644
> --- a/audio/avdtp.c
> +++ b/audio/avdtp.c
> @@ -1520,7 +1520,7 @@ static gboolean avdtp_setconf_cmd(struct avdtp *session, uint8_t transaction,
> ? ? ? ?case AVDTP_SEP_TYPE_SINK:
> ? ? ? ? ? ? ? ?if (!dev->source) {
> ? ? ? ? ? ? ? ? ? ? ? ?btd_device_add_uuid(dev->btd_dev, A2DP_SOURCE_UUID);
> - ? ? ? ? ? ? ? ? ? ? ? if (!dev->sink) {
> + ? ? ? ? ? ? ? ? ? ? ? if (!dev->source) {
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?error("Unable to get a audio source object");
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?err = AVDTP_BAD_STATE;
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?goto failed;
> --
> 1.7.5.4
>
> --

Ack.


--
Luiz Augusto von Dentz