Hi Grzegorz, On Thursday 19 of February 2015 15:16:36 Grzegorz Kolodziejczyk wrote: > Use dedicated control response function instead of assembling and > sending raw packet over socket. > --- > profiles/network/server.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/profiles/network/server.c b/profiles/network/server.c > index ebbe056..37bfba4 100644 > --- a/profiles/network/server.c > +++ b/profiles/network/server.c > @@ -307,14 +307,10 @@ static gboolean bnep_setup(GIOChannel *chan, > /* Highest known Control command ID > * is BNEP_FILTER_MULT_ADDR_RSP = 0x06 */ > if (req->type == BNEP_CONTROL && > - req->ctrl > BNEP_FILTER_MULT_ADDR_RSP) { > - uint8_t pkt[3]; > - > - pkt[0] = BNEP_CONTROL; > - pkt[1] = BNEP_CMD_NOT_UNDERSTOOD; > - pkt[2] = req->ctrl; > - > - send(sk, pkt, sizeof(pkt), 0); > + req->ctrl > BNEP_FILTER_MULT_ADDR_RSP) { > + error("cmd not understood"); > + bnep_send_ctrl_rsp(sk, BNEP_CONTROL, BNEP_CMD_NOT_UNDERSTOOD, > + req->ctrl); > > return FALSE; > } As discussed offline, this is not correct since we need to handle BNEP_CMD_NOT_UNDERSTOOD special case in bnep_send_ctrl_rsp. -- Best regards, Szymon Janc -- 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