Re: [PATCH BlueZ 2/8] audio: Fix handling of a2dp suspend indication

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Johan,

On Fri, Jun 15, 2012 at 12:30 PM, Johan Hedberg <johan.hedberg@xxxxxxxxx> wrote:
> Hi Luiz,
>
> On Fri, Jun 15, 2012, Luiz Augusto von Dentz wrote:
>> @@ -985,6 +985,9 @@ static gboolean suspend_ind(struct avdtp *session, struct avdtp_local_sep *sep,
>>                               void *user_data)
>>  {
>>       struct a2dp_sep *a2dp_sep = user_data;
>> +     struct a2dp_setup *setup;
>> +     gboolean start;
>> +     int perr;
>
> Could you just call this start_err?

Sounds good.

> Why isn't err used in this function?

Because we are not returning FALSE as suspend should not be reject we
are just unable to start.

>> +     perr = avdtp_start(session, a2dp_sep->stream);
>> +     if (perr < 0) {
>> +             error("Error on avdtp_start %s (%d)", strerror(-perr), -perr);
>> +             finalize_setup_errno(setup, -EIO, finalize_resume);
>
> Why aren't you passing perr instead of -EIO to finalize_setup_errno? If
> there's a valid reason for ignoring the specific value you should at
> least add a code comment for it.

Gonna fix this, there are a couple of other places that does that, so
I gonna fix them too in a separated patch.

-- 
Luiz Augusto von Dentz
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux