[svn-commits] oej: trunk r221554 - /trunk/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Oct 1 02:00:08 CDT 2009


Author: oej
Date: Thu Oct  1 02:00:04 2009
New Revision: 221554

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=221554
Log:
Simplify code for porturi, use TRUE/FALSE constructs when it's just TRUE or FALSE.


Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=221554&r1=221553&r2=221554
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Thu Oct  1 02:00:04 2009
@@ -12470,10 +12470,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 svn-commits mailing list