Re: [RFC 1/2] src/shared/att: Introduce struct bt_att.

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

 



Caught two bugs in bt_att_cancel:

> +bool bt_att_cancel(struct bt_att *att, unsigned int id)
> +{
> +       struct bt_att_request *request;
> +
> +       if (!request || !id)
> +               return false;

This above if statement should be:

if (!att || !id)
        return false;

> +
> +       request = queue_remove_if(att->request_queue, match_request_id,
> +                                                       UINT_TO_PTR(id));
> +       if (request)
> +               goto done;
> +
> +       request = queue_remove_if(att->pending_list, match_request_id,
> +                                                       UINT_TO_PTR(id));
> +       if (request)
> +               goto done;

The above if statement should be:

if (!request)
        return false;

> +
> +done:
> +       destroy_request(request);
> +
> +       wakeup_writer(att);
> +
> +       return true;
> +}

-Arman
--
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