You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/12/01 20:27:09 UTC

[GitHub] [mynewt-nimble] andrzej-kaczmarek commented on a change in pull request #684: Update ble_l2cap.c

andrzej-kaczmarek commented on a change in pull request #684: Update ble_l2cap.c
URL: https://github.com/apache/mynewt-nimble/pull/684#discussion_r352370294
 
 

 ##########
 File path: nimble/host/src/ble_l2cap.c
 ##########
 @@ -403,7 +403,9 @@ ble_l2cap_tx(struct ble_hs_conn *conn, struct ble_l2cap_chan *chan,
 
     case BLE_HS_EAGAIN:
         /* Controller could not accommodate full packet.  Enqueue remainder. */
-        STAILQ_INSERT_TAIL(&conn->bhc_tx_q, OS_MBUF_PKTHDR(txom), omp_next);
+        if (txom) {
+            STAILQ_INSERT_TAIL(&conn->bhc_tx_q, OS_MBUF_PKTHDR(txom), omp_next);
+        }
 
 Review comment:
   I did not look into code too much, but this does look like a workaround for an issue in in `ble_hs_hci_acl_tx` which should not return `BLE_HS_EAGAIN` and nullify `txom`. Basically with this fix we would return success to caller and drop packet.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services