mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/filter_repeated_packages_forv4.1' into 'release/v4.1'
filter repeated packages but not send response(v4.1) See merge request espressif/esp-idf!16823
This commit is contained in:
commit
12c4b90745
@ -11,6 +11,7 @@
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "esp_ble_mesh_networking_api.h"
|
||||
#include "ble_mesh_adapter.h"
|
||||
|
||||
@ -116,9 +117,10 @@ int ble_mesh_node_statistics_accumulate(uint8_t *data, uint32_t value, uint16_t
|
||||
xSemaphoreTake(ble_mesh_node_sema, portMAX_DELAY);
|
||||
|
||||
for (i = 0; i < ble_mesh_node_statistics.total_package_num; i++) {
|
||||
/* Filter out repeated packages during retransmission */
|
||||
if (ble_mesh_node_statistics.package_index[i] == sequence_num) {
|
||||
xSemaphoreGive(ble_mesh_node_sema);
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -129,6 +131,7 @@ int ble_mesh_node_statistics_accumulate(uint8_t *data, uint32_t value, uint16_t
|
||||
}
|
||||
|
||||
for (i = 0; i < ble_mesh_node_statistics.total_package_num; i++) {
|
||||
/* Judge whether the package is received for the first time */
|
||||
if (ble_mesh_node_statistics.package_index[i] == 0) {
|
||||
ble_mesh_node_statistics.package_index[i] = sequence_num;
|
||||
ble_mesh_node_statistics.package_num += 1;
|
||||
|
@ -23,6 +23,8 @@ CONFIG_BLE_MESH_PROVISIONER_RECV_HB=y
|
||||
CONFIG_BLE_MESH_PROVISIONER_RECV_HB_FILTER_SIZE=3
|
||||
CONFIG_BLE_MESH_SELF_TEST=y
|
||||
CONFIG_BLE_MESH_TEST_AUTO_ENTER_NETWORK=y
|
||||
CONFIG_BLE_MESH_WAIT_FOR_PROV_MAX_DEV_NUM=80
|
||||
CONFIG_BLE_MESH_MAX_PROV_NODES=80
|
||||
|
||||
# partitions
|
||||
CONFIG_PARTITION_TABLE_CUSTOM=y
|
||||
|
Loading…
Reference in New Issue
Block a user