diff options
author | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-01 17:01:03 +0000 |
---|---|---|
committer | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-10-01 17:01:03 +0000 |
commit | 5cac1690c680778d0c24036d5a416bf51082b935 (patch) | |
tree | dba0e602d44548efc198e758e6a57f37e087fc79 /channels | |
parent | 46bf9b556a4eb1939e12283235b468719c861953 (diff) |
Merged revisions 221554,221589 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r221554 | oej | 2009-10-01 02:00:04 -0500 (Thu, 01 Oct 2009) | 3 lines
Simplify code for porturi, use TRUE/FALSE constructs when it's just TRUE or FALSE.
................
r221589 | mnicholson | 2009-10-01 10:26:20 -0500 (Thu, 01 Oct 2009) | 9 lines
Merged revisions 221588 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r221588 | mnicholson | 2009-10-01 10:24:00 -0500 (Thu, 01 Oct 2009) | 2 lines
Use unsigned ints for portinuri flags.
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@221661 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index c234857a0..155ffc946 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1319,7 +1319,7 @@ struct sip_pvt { int sessionversion; /*!< SDP Session Version */ int64_t sessionversion_remote; /*!< Remote UA's SDP Session Version */ int session_modify; /*!< Session modification request true/false */ - int portinuri:1; /*!< Non zero if a port has been specified, will also disable srv lookups */ + unsigned int portinuri:1; /*!< Non zero if a port has been specified, will also disable srv lookups */ struct sockaddr_in sa; /*!< Our peer */ struct sockaddr_in redirip; /*!< Where our RTP should be going if not to us */ struct sockaddr_in vredirip; /*!< Where our Video RTP should be going if not to us */ @@ -1560,7 +1560,7 @@ struct sip_peer { struct ast_dnsmgr_entry *dnsmgr;/*!< DNS refresh manager for peer */ struct sockaddr_in addr; /*!< IP address of peer */ int maxcallbitrate; /*!< Maximum Bitrate for a video call */ - int portinuri:1; /*!< Whether the port should be included in the URI */ + unsigned int portinuri:1; /*!< Whether the port should be included in the URI */ /* Qualification */ struct sip_pvt *call; /*!< Call pointer */ @@ -11057,10 +11057,9 @@ static enum parse_register_result parse_register_contact(struct sip_pvt *pvt, st ast_log(LOG_NOTICE, "Not a valid SIP contact (missing sip:) trying to use anyway\n"); } - if (!ast_strlen_zero(pt)) - peer->portinuri = 1; - else - peer->portinuri = 0; + /* If we have a port number in the given URI, make sure we do remember to not check for NAPTR/SRV records. + The domain part is actually a host. */ + peer->portinuri = !ast_strlen_zero(pt) ? TRUE : FALSE; /* handle the transport type specified in Contact header. */ if ((transport_type = get_transport_str2enum(transport))) { |