[asterisk-commits] mmichelson: branch 1.8 r350679 - /branches/1.8/channels/sip/config_parser.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 13 14:29:05 CST 2012


Author: mmichelson
Date: Fri Jan 13 14:29:03 2012
New Revision: 350679

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=350679
Log:
Set port to a default sane value if a bogus one is provided when parsing hostnames.


Modified:
    branches/1.8/channels/sip/config_parser.c

Modified: branches/1.8/channels/sip/config_parser.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/sip/config_parser.c?view=diff&rev=350679&r1=350678&r2=350679
==============================================================================
--- branches/1.8/channels/sip/config_parser.c (original)
+++ branches/1.8/channels/sip/config_parser.c Fri Jan 13 14:29:03 2012
@@ -672,7 +672,9 @@
 			ast_log(LOG_NOTICE, "'%s' is not a valid port number on line %d of sip.conf. using default.\n", port, lineno);
 			port = NULL;
 		}
-	} else {
+	}
+
+	if (!port) {
 		if (*transport & SIP_TRANSPORT_TLS) {
 			*portnum = STANDARD_TLS_PORT;
 		} else {




More information about the asterisk-commits mailing list