[Freeswitch-branches] [commit] r13580 - freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia
FreeSWITCH SVN
mikej at freeswitch.org
Wed Jun 3 11:21:03 PDT 2009
Author: mikej
Date: Wed Jun 3 13:21:03 2009
New Revision: 13580
Log:
factor out helper function for getting ip address information from a msg_t sofia_glue_get_addr()
Modified:
freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
Modified: freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
==============================================================================
--- freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c (original)
+++ freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c Wed Jun 3 13:21:03 2009
@@ -1544,7 +1544,6 @@
switch_event_t *sevent;
int sub_state;
int sent_reply = 0;
- su_addrinfo_t *my_addrinfo = msg_addrinfo(nua_current_request(nua));
int network_port = 0;
char network_ip[80];
const char *contact_host, *contact_user;
@@ -1559,8 +1558,7 @@
return;
}
- get_addr(network_ip, sizeof(network_ip), my_addrinfo->ai_addr, my_addrinfo->ai_addrlen);
- network_port = ntohs(((struct sockaddr_in *) msg_addrinfo(nua_current_request(nua))->ai_addr)->sin_port);
+ sofia_glue_get_addr(nua_current_request(nua), network_ip, sizeof(network_ip), &network_port);
if (sofia_test_pflag(profile, PFLAG_AUTO_NAT) && profile->local_network &&
!switch_check_network_list_ip(network_ip, profile->local_network)) {
More information about the Freeswitch-branches
mailing list