[asterisk-commits] mnicholson: branch 1.6.0 r221662 - in /branches/1.6.0: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 1 12:09:16 CDT 2009


Author: mnicholson
Date: Thu Oct  1 12:09:12 2009
New Revision: 221662

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=221662
Log:
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.
  ........
................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/channels/chan_sip.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/channels/chan_sip.c?view=diff&rev=221662&r1=221661&r2=221662
==============================================================================
--- branches/1.6.0/channels/chan_sip.c (original)
+++ branches/1.6.0/channels/chan_sip.c Thu Oct  1 12:09:12 2009
@@ -1233,7 +1233,7 @@
 	char tag[11];				/*!< Our tag for this session */
 	int sessionid;				/*!< SDP Session ID */
 	int sessionversion;			/*!< SDP Session Version */
-	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 */
 	int64_t sessionversion_remote;		/*!< Remote UA's SDP Session Version */
 	int session_modify;			/*!< Session modification request true/false  */
 	struct sockaddr_in sa;			/*!< Our peer */
@@ -1501,7 +1501,7 @@
 	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 */
@@ -10582,10 +10582,9 @@
 		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))) {




More information about the asterisk-commits mailing list