[Asterisk-code-review] main/udptl.c: correctly handle udptl sequence wrap around (...asterisk[13])

Kevin Harwell asteriskteam at digium.com
Thu Jul 25 11:33:58 CDT 2019


Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/11575 )

Change subject: main/udptl.c: correctly handle udptl sequence wrap around
......................................................................


Patch Set 2: Code-Review-1

(1 comment)

https://gerrit.asterisk.org/#/c/11575/2/main/udptl.c 
File main/udptl.c:

https://gerrit.asterisk.org/#/c/11575/2/main/udptl.c@410 
PS2, Line 410: 	if (seq_no < 0x000F && s->rx_seq_no > 0xFFF0) {
             : 		/* received seq_no has wrapped adjust it */
             : 		seq_no += 0x10000;
             : 	} else {
             : 		/* otherwise make sure expected rx_seq_no is properly wrapped */
             : 		s->rx_seq_no &= 0xFFFF;
             : 	}
I don't quite understand the logic here. Could you explain more how this is working. Also what do the various numbers mean in this context, why are they used, etc..?



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11575
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I33caeb2bf13c574a1ebb81714b58907091d64234
Gerrit-Change-Number: 11575
Gerrit-PatchSet: 2
Gerrit-Owner: Torrey Searle <tsearle at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Thu, 25 Jul 2019 16:33:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190725/2065edc2/attachment.html>


More information about the asterisk-code-review mailing list