[20729] Allow processing of AckNack submessages with count == 0 (backport #4639)
Description
As spotted by https://github.com/omg-dds/dds-rtps/issues/35, Fast DDS ignores AckNack messages where the count field is 0.
This PR adds a unit test for ReaderProxy::check_and_set_acknack_count, and fixes the issue by changing the check on acknack_count from last received to next expected.
@Mergifyio backport 2.13.x 2.10.x 2.6.x
Contributor Checklist
-
[x] Commit messages follow the project guidelines.
-
[x] The code follows the style guidelines of this project.
-
[x] Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
-
[x] Any new/modified methods have been properly documented using Doxygen.
-
[x] Changes are ABI compatible.
-
[x] Changes are API compatible.
-
N/A New feature has been added to the
versions.mdfile (if applicable). -
N/A New feature has been documented/Current behavior is correctly described in the documentation.
-
[x] Applicable backports have been included in the description.
Reviewer Checklist
- [x] The PR has a milestone assigned.
- [x] The title and description correctly express the PR's purpose.
- [x] Check contributor checklist is correct.
- [x] Check CI results: changes do not issue any warning.
- [x] Check CI results: failing tests are unrelated with the changes.
This is an automatic backport of pull request #4639 done by [Mergify](https://mergify.com).
Cherry-pick of 66fc7c533a3fa8d5633dfb6f6f23c96cd6315bc6 has failed:
On branch mergify/bp/2.6.x/pr-4639
Your branch is up to date with 'origin/2.6.x'.
You are currently cherry-picking commit 66fc7c533.
(fix conflicts and run "git cherry-pick --continue")
(use "git cherry-pick --skip" to skip this patch)
(use "git cherry-pick --abort" to cancel the cherry-pick operation)
Changes to be committed:
modified: include/fastdds/rtps/writer/ReaderProxy.h
modified: src/cpp/rtps/writer/ReaderProxy.cpp
Unmerged paths:
(use "git add <file>..." to mark resolution)
both modified: test/unittest/rtps/writer/ReaderProxyTests.cpp
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
@richiprosima please test this