From 14bb7ff651a4b20e88eefaf9cad28525566aef7f Mon Sep 17 00:00:00 2001 From: Brett Bryant Date: Wed, 23 Jul 2008 20:39:37 +0000 Subject: [PATCH] Merged revisions 133197 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r133197 | bbryant | 2008-07-23 15:33:22 -0500 (Wed, 23 Jul 2008) | 2 lines Fix issue where tcp in sip is enabled by default, despite what it says in the config sample file. Also fix "sip show settings" for tcp connections. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@133218 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d29e516d92..36d8f4f2cf 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -13011,7 +13011,7 @@ static char *sip_show_settings(struct ast_cli_entry *e, int cmd, struct ast_cli_ ast_cli(a->fd, " UDP SIP Port: %d\n", ntohs(bindaddr.sin_port)); ast_cli(a->fd, " UDP Bindaddress: %s\n", ast_inet_ntoa(bindaddr.sin_addr)); ast_cli(a->fd, " TCP SIP Port: "); - if (sip_tcp_desc.sin.sin_family != AF_INET) { + if (sip_tcp_desc.sin.sin_family == AF_INET) { ast_cli(a->fd, "%d\n", ntohs(sip_tcp_desc.sin.sin_port)); ast_cli(a->fd, " TCP Bindaddress: %s\n", ast_inet_ntoa(sip_tcp_desc.sin.sin_addr)); } else { @@ -20619,9 +20619,7 @@ static int reload_config(enum channelreloadreason reason) memset(&sip_tcp_desc.sin, 0, sizeof(sip_tcp_desc.sin)); memset(&sip_tls_desc.sin, 0, sizeof(sip_tls_desc.sin)); - /* sip_tcp_desc.sin.sin_family = AF_INET; Disabled, since TCP support in Asterisk is experimental */ - sip_tcp_desc.sin.sin_family = 0; - default_tls_cfg.enabled = FALSE; + default_tls_cfg.enabled = FALSE; /* Default: Disable TLS */ sip_tcp_desc.sin.sin_port = htons(STANDARD_SIP_PORT); sip_tls_desc.sin.sin_port = htons(STANDARD_TLS_PORT);