[asterisk-commits] jpdionne: branch group/v6-new r271193 - /team/group/v6-new/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 17 10:42:20 CDT 2010
Author: jpdionne
Date: Thu Jun 17 10:42:16 2010
New Revision: 271193
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=271193
Log:
Other sip config fixes.
- Set default port with tcpbindaddr and tlsbindaddr.
- 'sip reload' stops TCP server is has been switch to tcpenable=no
Modified:
team/group/v6-new/channels/chan_sip.c
Modified: team/group/v6-new/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/channels/chan_sip.c?view=diff&rev=271193&r1=271192&r2=271193
==============================================================================
--- team/group/v6-new/channels/chan_sip.c (original)
+++ team/group/v6-new/channels/chan_sip.c Thu Jun 17 10:42:16 2010
@@ -26621,23 +26621,27 @@
if (sip_cfg.tcp_enabled) {
if (ast_sockaddr_isnull(&sip_tcp_desc.local_address))
ast_sockaddr_copy(&sip_tcp_desc.local_address, &bindaddr);
- ast_tcptls_server_start(&sip_tcp_desc);
- if (sip_tcp_desc.accept_fd == -1) {
- /* TCP server start failed. Tell the admin */
- ast_log(LOG_ERROR, "SIP TCP Server start failed. Not listening on TCP socket.\n");
- } else {
- ast_debug(2, "SIP TCP server started\n");
- }
+ if (!ast_sockaddr_port(&sip_tcp_desc.local_address))
+ ast_sockaddr_set_port(&sip_tcp_desc.local_address, STANDARD_SIP_PORT);
+ } else {
+ ast_sockaddr_setnull(&sip_tcp_desc.local_address);
+ }
+ ast_tcptls_server_start(&sip_tcp_desc);
+ if (sip_tcp_desc.accept_fd == -1) {
+ /* TCP server start failed. Tell the admin */
+ ast_log(LOG_ERROR, "SIP TCP Server start failed. Not listening on TCP socket.\n");
+ } else {
+ ast_debug(2, "SIP TCP server started\n");
}
/* Start TLS server if needed */
memcpy(sip_tls_desc.tls_cfg, &default_tls_cfg, sizeof(default_tls_cfg));
if (ast_ssl_setup(sip_tls_desc.tls_cfg)) {
- if (ast_sockaddr_isnull(&sip_tls_desc.local_address)) {
+ if (ast_sockaddr_isnull(&sip_tls_desc.local_address))
ast_sockaddr_copy(&sip_tls_desc.local_address, &bindaddr);
+ if (!ast_sockaddr_port(&sip_tls_desc.local_address))
ast_sockaddr_set_port(&sip_tls_desc.local_address, STANDARD_TLS_PORT);
- }
ast_tcptls_server_start(&sip_tls_desc);
if (default_tls_cfg.enabled && sip_tls_desc.accept_fd == -1) {
ast_log(LOG_ERROR, "TLS Server start failed. Not listening on TLS socket.\n");
More information about the asterisk-commits
mailing list