summaryrefslogtreecommitdiff
path: root/channels/sip/include
diff options
context:
space:
mode:
authorAlec L Davis <sivad.a@paradise.net.nz>2012-01-30 22:28:37 +0000
committerAlec L Davis <sivad.a@paradise.net.nz>2012-01-30 22:28:37 +0000
commit0ccc1f5274e5304e2056559a9d4af03363b00565 (patch)
tree75c25c2b7c58ac134b264356964e91317833766f /channels/sip/include
parentc6489d7b32a124cc3fe818eddae683377e562d05 (diff)
Merged revisions 353321 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r353321 | alecdavis | 2012-01-31 11:16:22 +1300 (Tue, 31 Jan 2012) | 25 lines Merged revisions 353320 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r353320 | alecdavis | 2012-01-31 10:57:49 +1300 (Tue, 31 Jan 2012) | 18 lines 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/trunk@353347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sip/include')
-rw-r--r--channels/sip/include/dialog.h4
-rw-r--r--channels/sip/include/sip.h16
2 files changed, 10 insertions, 10 deletions
diff --git a/channels/sip/include/dialog.h b/channels/sip/include/dialog.h
index dc60f9753..92834b230 100644
--- a/channels/sip/include/dialog.h
+++ b/channels/sip/include/dialog.h
@@ -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) */
diff --git a/channels/sip/include/sip.h b/channels/sip/include/sip.h
index 524374386..c9862bc84 100644
--- a/channels/sip/include/sip.h
+++ b/channels/sip/include/sip.h
@@ -821,7 +821,7 @@ struct sip_dual {
struct ast_channel *chan1; /*!< First channel involved */
struct ast_channel *chan2; /*!< Second channel involved */
struct sip_request req; /*!< Request that caused the transfer (REFER) */
- int seqno; /*!< Sequence number */
+ uint32_t seqno; /*!< Sequence number */
char *park_exten;
char *park_context;
};
@@ -1037,9 +1037,9 @@ struct sip_pvt {
char via[128]; /*!< Via: header */
int maxforwards; /*!< SIP Loop prevention */
struct sip_socket socket; /*!< The socket used for this dialog */
- unsigned int ocseq; /*!< Current outgoing seqno */
- unsigned int icseq; /*!< Current incoming seqno */
- unsigned int init_icseq; /*!< Initial incoming seqno from first request */
+ uint32_t ocseq; /*!< Current outgoing seqno */
+ uint32_t icseq; /*!< Current incoming seqno */
+ uint32_t init_icseq; /*!< Initial incoming seqno from first request */
ast_group_t callgroup; /*!< Call group */
ast_group_t pickupgroup; /*!< Pickup group */
int lastinvite; /*!< Last Cseq of invite */
@@ -1115,8 +1115,8 @@ struct sip_pvt {
unsigned int stalenonce:1; /*!< Marks the current nonce as responded too */
char lastmsg[256]; /*!< Last Message sent/received */
int amaflags; /*!< AMA Flags */
- int pendinginvite; /*!< Any pending INVITE or state NOTIFY (in subscribe pvt's) ? (seqno of this) */
- int glareinvite; /*!< A invite received while a pending invite is already present is stored here. Its seqno is the
+ uint32_t pendinginvite; /*!< Any pending INVITE or state NOTIFY (in subscribe pvt's) ? (seqno of this) */
+ uint32_t glareinvite; /*!< A invite received while a pending invite is already present is stored here. Its seqno is the
value. Since this glare invite's seqno is not the same as the pending invite's, it must be
held in order to properly process acknowledgements for our 491 response. */
struct sip_request initreq; /*!< Latest request that opened a new transaction
@@ -1197,7 +1197,7 @@ struct sip_pkt {
struct sip_pkt *next; /*!< Next packet in linked list */
int retrans; /*!< Retransmission number */
int method; /*!< SIP method for this packet */
- int seqno; /*!< Sequence number */
+ uint32_t seqno; /*!< Sequence number */
char is_resp; /*!< 1 if this is a response packet (e.g. 200 OK), 0 if it is a request */
char is_fatal; /*!< non-zero if there is a fatal error */
int response_code; /*!< If this is a response, the response code */
@@ -1375,7 +1375,7 @@ struct sip_registry {
enum sipregistrystate regstate; /*!< Registration state (see above) */
struct timeval regtime; /*!< Last successful registration time */
int callid_valid; /*!< 0 means we haven't chosen callid for this registry yet. */
- unsigned int ocseq; /*!< Sequence number we got to for REGISTERs for this registry */
+ uint32_t ocseq; /*!< Sequence number we got to for REGISTERs for this registry */
struct ast_dnsmgr_entry *dnsmgr; /*!< DNS refresh manager for register */
struct ast_sockaddr us; /*!< Who the server thinks we are */
int noncecount; /*!< Nonce-count */