Re: [PATCH v2] Bluetooth: Fix response on confirm_name

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

 



Hi Marcel,

On 27 February 2014 16:47, Marcel Holtmann <marcel@xxxxxxxxxxxx> wrote:
> Hi Lukasz,
>
>> According to mgmt-api.txt, in case of confirm name command,
>> cmd_complete should be always use as a response. Not command status
>> as it is now for failures.
>> Using command complete on failure is actually better as client might
>> be interested in device address for which confirm name failed.
>>
>> Signed-off-by: Lukasz Rymanowski <lukasz.rymanowski@xxxxxxxxx>
>> ---
>> net/bluetooth/mgmt.c | 10 ++++++----
>> 1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
>> index 4c4912e..8b7a3c4 100644
>> --- a/net/bluetooth/mgmt.c
>> +++ b/net/bluetooth/mgmt.c
>> @@ -3627,15 +3627,17 @@ static int confirm_name(struct sock *sk, struct hci_dev *hdev, void *data,
>>       hci_dev_lock(hdev);
>>
>>       if (!hci_discovery_active(hdev)) {
>> -             err = cmd_status(sk, hdev->id, MGMT_OP_CONFIRM_NAME,
>> -                              MGMT_STATUS_FAILED);
>> +             err = cmd_complete(sk, hdev->id, MGMT_OP_CONFIRM_NAME,
>> +                                             MGMT_STATUS_FAILED, &cp->addr,
>> +                                                     sizeof(cp->addr));
>
> you are testing me, right ;)
>

Yup, and you are doing just fine :)
btw, v3 is the one.

> Regards
>
> Marcel
>

BR
\Lukasz
--
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