RFC3261 Section 8.1.1.5. The sequence number value MUST be expressible as a 32-bit unsigned integer

* fix: use %u instead of %d when dealing with CSeq numbers - to remove possibility of -ve numbers.

* fix: change all uses of seqno and friends (ocseq icseq) from 'int' or 'unsigned int' to uint32_t.

Summary of CSeq numbers.
An initial CSeq number must be less than 2^31
A CSeq number can increase in value up to 2^32-1
An incrementing CSeq number must not wrap around to 0.

Tested with Asterisk 1.8.8.2 with Grandstream phones.
 
alecdavis (license 585)
Tested by: alecdavis
 
Review: https://reviewboard.asterisk.org/r/1699/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@353320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Alec L Davis
2012-01-30 21:57:49 +00:00
parent 2281ba7cef
commit 8fc0050b54
3 changed files with 74 additions and 74 deletions

View File

@@ -67,13 +67,13 @@ void dialog_unlink_all(struct sip_pvt *dialog);
/*! \brief Acknowledges receipt of a packet and stops retransmission
* called with p locked*/
int __sip_ack(struct sip_pvt *p, int seqno, int resp, int sipmethod);
int __sip_ack(struct sip_pvt *p, uint32_t seqno, int resp, int sipmethod);
/*! \brief Pretend to ack all packets
* called with p locked */
void __sip_pretend_ack(struct sip_pvt *p);
/*! \brief Acks receipt of packet, keep it around (used for provisional responses) */
int __sip_semi_ack(struct sip_pvt *p, int seqno, int resp, int sipmethod);
int __sip_semi_ack(struct sip_pvt *p, uint32_t seqno, int resp, int sipmethod);
#endif /* defined(_SIP_DIALOG_H) */