Просмотр исходного кода

component/bt: Added the error log to the l2cble_start_conn_update func.

Yulong 8 лет назад
Родитель
Сommit
d79aeab3aa
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      components/bt/bluedroid/stack/l2cap/l2c_ble.c

+ 2 - 1
components/bt/bluedroid/stack/l2cap/l2c_ble.c

@@ -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");