]> granicus.if.org Git - esp-idf/commitdiff
component/bt: Added the error log to the l2cble_start_conn_update func.
authorYulong <huangyulong@espressif.com>
Thu, 22 Jun 2017 07:53:27 +0000 (03:53 -0400)
committerYulong <huangyulong@espressif.com>
Thu, 22 Jun 2017 07:53:27 +0000 (03:53 -0400)
components/bt/bluedroid/stack/l2cap/l2c_ble.c

index 8d8edbb344e884ae5734242e395b331ec5731a4d..6d2c008119c0b8f6f21c03c0e614843abed68a54 100644 (file)
@@ -472,6 +472,7 @@ static BOOLEAN l2cble_start_conn_update (tL2C_LCB *p_lcb)
     UINT8 status;
 
     if (p_lcb->conn_update_mask & L2C_BLE_UPDATE_PENDING) {
+        L2CAP_TRACE_ERROR("%s, the last connection update command still pending.", __func__);
         return FALSE;
     }
 
@@ -949,9 +950,9 @@ void l2cble_process_rc_param_request_evt(UINT16 handle, UINT16 int_min, UINT16 i
         p_lcb->max_interval = int_max;
         p_lcb->latency = latency;
         p_lcb->timeout = timeout;
-        p_lcb->conn_update_mask |= L2C_BLE_UPDATE_PENDING;
         /* if update is enabled, always accept connection parameter update */
         if ((p_lcb->conn_update_mask & L2C_BLE_CONN_UPDATE_DISABLE) == 0) {
+            p_lcb->conn_update_mask |= L2C_BLE_UPDATE_PENDING;
             btsnd_hcic_ble_rc_param_req_reply(handle, int_min, int_max, latency, timeout, 0, 0);
         } else {
             L2CAP_TRACE_EVENT ("L2CAP - LE - update currently disabled");