diff options
author | Mark Michelson <mmichelson@digium.com> | 2012-01-13 20:32:19 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2012-01-13 20:32:19 +0000 |
commit | 9c161503dca5eb7944244ba96c05270794994677 (patch) | |
tree | ea88ebbe1aef74d9fa830cff16ace44ac5d3fab8 /channels/sip/config_parser.c | |
parent | ec2b28d913b993d1a9c5c5a9b53215f1d60579b4 (diff) |
Set port to a default sane value if a bogus one is provided when parsing hostnames.
........
Merged revisions 350679 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 350680 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sip/config_parser.c')
-rw-r--r-- | channels/sip/config_parser.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/sip/config_parser.c b/channels/sip/config_parser.c index 0ab9ed769..72a7b2c7d 100644 --- a/channels/sip/config_parser.c +++ b/channels/sip/config_parser.c @@ -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 { |