summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorOlle Johansson <oej@edvina.net>2009-10-01 07:00:04 +0000
committerOlle Johansson <oej@edvina.net>2009-10-01 07:00:04 +0000
commit73697dc2c7a5e9086fd4961759e01b543835c549 (patch)
tree1d949a8a2bd02f4cc252ae64c9f8b9d2ff05fb15 /channels
parentd043f52a2dad72aecc90d7be56316271de1a5ef4 (diff)
Simplify code for porturi, use TRUE/FALSE constructs when it's just TRUE or FALSE.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@221554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 6bf9d1cdd..d579e00ef 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -12470,10 +12470,9 @@ static enum parse_register_result parse_register_contact(struct sip_pvt *pvt, st
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))) {