]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Set port to a default sane value if a bogus one is provided when parsing hostnames.
authorMark Michelson <mmichelson@digium.com>
Fri, 13 Jan 2012 20:31:36 +0000 (20:31 +0000)
committerMark Michelson <mmichelson@digium.com>
Fri, 13 Jan 2012 20:31:36 +0000 (20:31 +0000)
........

Merged revisions 350679 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@350680 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/sip/config_parser.c

index 0ab9ed7693f704fd29f7a7c9b6252fba56dabee1..72a7b2c7d077b9c4674283d68babd5f07351f2a5 100644 (file)
@@ -672,7 +672,9 @@ int sip_parse_host(char *line, int lineno, char **hostname, int *portnum, enum s
                        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 {