Skip to content
Snippets Groups Projects
Commit e8aa0e29 authored by Mark Michelson's avatar Mark Michelson
Browse files

Change the remote user agent session version variable

from an int to a uint64_t. This prevents potential comparison
problems from happening if the version string exceeds
INT_MAX. This was an apparent problem for one user who could
not properly place a call on hold since the version in the
SDP of the re-INVITE to place the call on hold greatly 
exceeded INT_MAX.

This also aligns with RFC 2327 better since it recommends
using an NTP timestamp for the version (which is a 
64-bit number).


(closes issue #13531)
Reported by: sgofferj
Patches:
      13531.patch uploaded by putnopvut (license 60)
Tested by: sgofferj



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 574f2daa
Branches
Tags
No related merge requests found
...@@ -1591,7 +1591,7 @@ struct sip_pvt { ...@@ -1591,7 +1591,7 @@ struct sip_pvt {
char tag[11]; /*!< Our tag for this session */ char tag[11]; /*!< Our tag for this session */
int sessionid; /*!< SDP Session ID */ int sessionid; /*!< SDP Session ID */
int sessionversion; /*!< SDP Session Version */ int sessionversion; /*!< SDP Session Version */
int sessionversion_remote; /*!< Remote UA's SDP Session Version */ uint64_t sessionversion_remote; /*!< Remote UA's SDP Session Version */
int session_modify; /*!< Session modification request true/false */ int session_modify; /*!< Session modification request true/false */
struct sockaddr_in sa; /*!< Our peer */ struct sockaddr_in sa; /*!< Our peer */
struct sockaddr_in redirip; /*!< Where our RTP should be going if not to us */ struct sockaddr_in redirip; /*!< Where our RTP should be going if not to us */
...@@ -7233,7 +7233,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action ...@@ -7233,7 +7233,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action
int last_rtpmap_codec=0; int last_rtpmap_codec=0;
   
char buf[SIPBUFSIZE]; char buf[SIPBUFSIZE];
int rua_version; uint64_t rua_version;
int red_data_pt[10]; int red_data_pt[10];
int red_num_gen = 0; int red_num_gen = 0;
...@@ -7309,7 +7309,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action ...@@ -7309,7 +7309,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action
ast_log(LOG_WARNING, "SDP syntax error in o= line\n"); ast_log(LOG_WARNING, "SDP syntax error in o= line\n");
return -1; return -1;
} }
if (!sscanf(token, "%d", &rua_version)) { if (!sscanf(token, "%lu", &rua_version)) {
ast_log(LOG_WARNING, "SDP syntax error in o= line version\n"); ast_log(LOG_WARNING, "SDP syntax error in o= line version\n");
return -1; return -1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment