[asterisk-commits] simon.perreault: branch group/v6-new r266701 - /team/group/v6-new/channels/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jun 1 12:21:02 CDT 2010
Author: simon.perreault
Date: Tue Jun 1 12:20:58 2010
New Revision: 266701
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=266701
Log:
We can only call ast_sockaddr_set_port() once the family of an ast_sockaddr is
known. This in turn depends on DNS lookup.
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=266701&r1=266700&r2=266701
==============================================================================
--- team/group/v6-new/channels/chan_sip.c (original)
+++ team/group/v6-new/channels/chan_sip.c Tue Jun 1 12:20:58 2010
@@ -25332,12 +25332,6 @@
set_socket_transport(&peer->socket, peer->default_outbound_transport);
}
- if (port && !realtime && peer->host_dynamic) {
- ast_sockaddr_set_port(&peer->defaddr, port);
- } else if (port) {
- ast_sockaddr_set_port(&peer->addr, port);
- }
-
if (ast_str_strlen(fullcontact)) {
ast_string_field_set(peer, fullcontact, ast_str_buffer(fullcontact));
peer->rt_fromcontact = TRUE;
@@ -25373,6 +25367,12 @@
}
ast_string_field_set(peer, tohost, srvlookup);
+ }
+
+ if (port && !realtime && peer->host_dynamic) {
+ ast_sockaddr_set_port(&peer->defaddr, port);
+ } else if (port) {
+ ast_sockaddr_set_port(&peer->addr, port);
}
if (!sip_cfg.ignore_regexpire && peer->host_dynamic && realtime) {
More information about the asterisk-commits
mailing list