applications: PacketSink is prone to misconfigurations.
The problem lies in an attribute (EnableSeqTsSizeHeader) and a TracedCallback (RxWithSeqTsSize).
There are 4 possible cases:
-
EnableSeqTsSizeHeadertrue andRxWithSeqTsSizepointing to some function. -
EnableSeqTsSizeHeaderfalse andRxWithSeqTsSizepointing to no function. -
EnableSeqTsSizeHeadertrue andRxWithSeqTsSizepointing to no function. -
EnableSeqTsSizeHeaderfalse andRxWithSeqTsSizepointing to some function.
The cases 1 and 2 are "good" configurations.
Case 3 is a misconfiguration and results in (complex) code being executed unnecessarily.
Case 4 is a misconfiguration and results in a headache for the user, as the callback was set, but it's not fired.
!712 (merged) would allow to remove the EnableSeqTsSizeHeader attribute - or deprecate it.
Deprecation in this case is preferred, as user's scripts are supposed to use it. In the new configuration the attribute would be simply ignored, as checking if RxWithSeqTsSize is empty will have the same effect, and would prevent cases 3 and 4.