فهرست منبع

ble_mesh: Allow maximum 377 octets payload

lly 6 سال پیش
والد
کامیت
bfed4fc90c
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      components/bt/esp_ble_mesh/btc/btc_ble_mesh_prov.c

+ 4 - 4
components/bt/esp_ble_mesh/btc/btc_ble_mesh_prov.c

@@ -1944,8 +1944,8 @@ void btc_ble_mesh_model_call_handler(btc_msg_t *msg)
         break;
         break;
     }
     }
     case BTC_BLE_MESH_ACT_SERVER_MODEL_SEND: {
     case BTC_BLE_MESH_ACT_SERVER_MODEL_SEND: {
-        /* arg->model_send.length contains opcode & message, 8 is used for TransMIC */
-        struct net_buf_simple *buf = bt_mesh_alloc_buf(arg->model_send.length + 8);
+        /* arg->model_send.length contains opcode & message, 4 is used for TransMIC */
+        struct net_buf_simple *buf = bt_mesh_alloc_buf(arg->model_send.length + 4);
         if (!buf) {
         if (!buf) {
             BT_ERR("%s, Failed to allocate memory", __func__);
             BT_ERR("%s, Failed to allocate memory", __func__);
             break;
             break;
@@ -1962,8 +1962,8 @@ void btc_ble_mesh_model_call_handler(btc_msg_t *msg)
     }
     }
     case BTC_BLE_MESH_ACT_CLIENT_MODEL_SEND: {
     case BTC_BLE_MESH_ACT_CLIENT_MODEL_SEND: {
         bt_mesh_role_param_t common = {0};
         bt_mesh_role_param_t common = {0};
-        /* arg->model_send.length contains opcode & message, 8 is used for TransMIC */
-        struct net_buf_simple *buf = bt_mesh_alloc_buf(arg->model_send.length + 8);
+        /* arg->model_send.length contains opcode & message, 4 is used for TransMIC */
+        struct net_buf_simple *buf = bt_mesh_alloc_buf(arg->model_send.length + 4);
         if (!buf) {
         if (!buf) {
             BT_ERR("%s, Failed to allocate memory", __func__);
             BT_ERR("%s, Failed to allocate memory", __func__);
             break;
             break;