Re: [PATCH] network: Reply to extensions at connection setup

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

 



Hi Frédéric,

On Thu, May 31, 2012 at 11:30 AM, Frédéric Dalleau
<frederic.dalleau@xxxxxxxxxxxxxxx> wrote:
> -       if (req->type == BNEP_CONTROL &&
> +       if ((req->type & ~BNEP_EXT_HEADER) == BNEP_CONTROL &&
>                                req->ctrl > BNEP_FILTER_MULT_ADDR_RSP) {
>                uint8_t pkt[3];
>
> @@ -390,7 +416,8 @@ static gboolean bnep_setup(GIOChannel *chan,
>                return FALSE;
>        }
>
> -       if (req->type != BNEP_CONTROL || req->ctrl != BNEP_SETUP_CONN_REQ)
> +       if ((req->type & ~BNEP_EXT_HEADER) != BNEP_CONTROL ||
> +                               req->ctrl != BNEP_SETUP_CONN_REQ)
>                return FALSE;
>

Perhaps you can have a macro for getting just the header type without
the extension bit e.g. BNEP_HEADER(type) ((type) & ~BNEP_EXT_HEADER)

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