Commit 5b75126
authored
RTPS: Pack count field of ACKNACK submessage correctly (#3915)
* Pack count field of ACKNACK submessage correctly
The count field of ACKNACK submessage is an integer field and should be packed using the endianness flag, just like how the count field of HEARTBEAT submessage is handled.
Currently, `count=1` is incorrectly packed as `"\x00\x00\x00\x01"` (== 16777216), regardless of the endianness bit.
With this change, `count=1` is correctly packed as `"\x01\x00\x00\x00"` (== 1), given the endianness is set.
* add a unit test
Signed-off-by: Seulbae Kim <squizz617@gmail.com>
---------
Signed-off-by: Seulbae Kim <squizz617@gmail.com>1 parent 56c01c6 commit 5b75126
2 files changed
+35
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
354 | | - | |
| 354 | + | |
| 355 | + | |
355 | 356 | | |
356 | 357 | | |
357 | 358 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
0 commit comments