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

[bluetooth-dev] another rfcomm.c bug?



Shouldn't the pn_msg be swapped after the pointer
to pn_pkt is fully set up?  (see the patch below)

Thanks,
Will

Index: rfcomm.c
===================================================================
RCS file: /cvsroot/openbt/linux/drivers/char/bluetooth/rfcomm.c,v
retrieving revision 1.124
diff -a -u -d -r1.124 rfcomm.c
--- rfcomm.c    2001/10/12 12:03:22     1.124
+++ rfcomm.c    2001/10/15 20:13:10
@@ -1571,7 +1571,6 @@
        case PN:  /*DLC parameter negotiation*/
        {
                pn_msg *pn_pkt = (pn_msg*) data;
-               swap_pn_msg(pn_pkt);
                D_CTRL(FNC"Received DLC parameter negotiation, PN\n");
                if (longpkt) {
                        /* If a long length field is used, then move the
@@ -1579,6 +1578,7 @@
                        data++;
                        pn_pkt = (pn_msg*) data;
                }  
+               swap_pn_msg(pn_pkt);
                if (pn_pkt->mcc_s_head.type.cr == MCC_CMD) {
                        u8 tmp_dlci;
                        u16 frame_size;
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com