Open bzbarsky-apple opened 3 years ago
SW Dev Bug Review: Closing this, as doesn't appear needed anymore and/or is complete, please reopen if needed.
This is still an issue, though mAckId is now named mAckMessageCounter
.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Problem
PayloadHeader
has two different ways to represent whether it's an ack: thekExchangeFlag_AckMsg
flag inmExchangeFlags
andmAckId.HasValue()
. This is confusing some people who think they need to change both places to be sure they have an ack id.PayloadHeader::Decode
ensures the two are in sync, and theSetAckId
setters ensure they stay in sync, but it might be better if there were only one source of truth.Proposed Solution
Have a single source of truth, probably
mAckId.HasValue()
.Encode
could then reconstitute the flag byte based on that, and we wouldn't need the synchronization code in theSetAckId
setters.I'm a little torn on whether to leave the
IsAckMsg
API, since that might still confuse people, but probably best to leave it for now.@andy31415 @pan-apple