[asterisk-commits] simon.perreault: branch group/v6-new r274772 - /team/group/v6-new/channels/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jul 8 14:09:33 CDT 2010
Author: simon.perreault
Date: Thu Jul 8 14:09:29 2010
New Revision: 274772
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=274772
Log:
Re-added and converted code that vanished mysteriously when porting to IPv6
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=274772&r1=274771&r2=274772
==============================================================================
--- team/group/v6-new/channels/chan_sip.c (original)
+++ team/group/v6-new/channels/chan_sip.c Thu Jul 8 14:09:29 2010
@@ -25732,6 +25732,20 @@
ast_sockaddr_set_port(&peer->addr, port);
}
+ if (ast_sockaddr_port(&peer->addr) == 0) {
+ ast_sockaddr_set_port(&peer->addr,
+ (peer->socket.type & SIP_TRANSPORT_TLS) ?
+ STANDARD_TLS_PORT : STANDARD_SIP_PORT);
+ }
+ if (ast_sockaddr_port(&peer->defaddr) == 0) {
+ ast_sockaddr_set_port(&peer->defaddr,
+ (peer->socket.type & SIP_TRANSPORT_TLS) ?
+ STANDARD_TLS_PORT : STANDARD_SIP_PORT);
+ }
+ if (!peer->socket.port) {
+ peer->socket.port = htons(((peer->socket.type & SIP_TRANSPORT_TLS) ? STANDARD_TLS_PORT : STANDARD_SIP_PORT));
+ }
+
if (!sip_cfg.ignore_regexpire && peer->host_dynamic && realtime) {
time_t nowtime = time(NULL);
More information about the asterisk-commits
mailing list