[asterisk-commits] bbryant: trunk r132468 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 21 12:42:45 CDT 2008


Author: bbryant
Date: Mon Jul 21 12:42:45 2008
New Revision: 132468

URL: http://svn.digium.com/view/asterisk?view=rev&rev=132468
Log:
Fix bug where ast_parse_arg would inadvertantly enable sip tcp when parsing a tcpbindaddr if it was disabled.

(closes issue #13117)
Reported by: pj

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=132468&r1=132467&r2=132468
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Jul 21 12:42:45 2008
@@ -21007,8 +21007,10 @@
 			sip_tcp_desc.sin.sin_family = ast_false(v->value) ? 0 : AF_INET;
 			ast_debug(2, "Enabling TCP socket for listening\n");
 		} else if (!strcasecmp(v->name, "tcpbindaddr")) {
+			int family = sip_tcp_desc.sin.sin_family;
 			if (ast_parse_arg(v->value, PARSE_INADDR, &sip_tcp_desc.sin))
 				ast_log(LOG_WARNING, "Invalid %s '%s' at line %d of %s\n", v->name, v->value, v->lineno, config);
+			sip_tcp_desc.sin.sin_family = family;
 			ast_debug(2, "Setting TCP socket address to %s\n", v->value);
 		} else if (!strcasecmp(v->name, "tlsenable")) {
 			default_tls_cfg.enabled = ast_true(v->value) ? TRUE : FALSE;




More information about the asterisk-commits mailing list