[Freeswitch-trunk] [commit] r12757 - freeswitch/trunk/src/mod/endpoints/mod_sofia
FreeSWITCH SVN
mikej at freeswitch.org
Tue Mar 24 10:57:00 PDT 2009
Author: mikej
Date: Tue Mar 24 12:57:00 2009
New Revision: 12757
Log:
use nua_handle_home instead of using nua internals to get the nua handle home
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_sla.c
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Tue Mar 24 12:57:00 2009
@@ -1280,7 +1280,7 @@
if (!switch_channel_test_flag(channel, CF_ANSWERED) && !sofia_test_flag(tech_pvt, TFLAG_BYE)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Overlap Dial with %d %s\n", code, reason);
- nua_respond(tech_pvt->nh, code, su_strdup(tech_pvt->nh->nh_home, reason), TAG_IF(to_uri, SIPTAG_CONTACT_STR(to_uri)),
+ nua_respond(tech_pvt->nh, code, su_strdup(nua_handle_home(tech_pvt->nh), reason), TAG_IF(to_uri, SIPTAG_CONTACT_STR(to_uri)),
SIPTAG_SUPPORTED_STR(NULL), SIPTAG_ACCEPT_STR(NULL),
TAG_IF(!switch_strlen_zero(max_forwards), SIPTAG_MAX_FORWARDS_STR(max_forwards)), TAG_END());
@@ -1303,12 +1303,12 @@
sofia_glue_tech_patch_sdp(tech_pvt);
sofia_glue_tech_proxy_remote_addr(tech_pvt);
}
- nua_respond(tech_pvt->nh, code, su_strdup(tech_pvt->nh->nh_home, reason), SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
+ nua_respond(tech_pvt->nh, code, su_strdup(nua_handle_home(tech_pvt->nh), reason), SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
SOATAG_REUSE_REJECTED(1),
SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"), NUTAG_INCLUDE_EXTRA_SDP(1), TAG_END());
} else {
- nua_respond(tech_pvt->nh, code, su_strdup(tech_pvt->nh->nh_home, reason), SIPTAG_CONTACT_STR(tech_pvt->reply_contact), TAG_END());
+ nua_respond(tech_pvt->nh, code, su_strdup(nua_handle_home(tech_pvt->nh), reason), SIPTAG_CONTACT_STR(tech_pvt->reply_contact), TAG_END());
}
}
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c Tue Mar 24 12:57:00 2009
@@ -793,7 +793,7 @@
}
if (sip->sip_path) {
- path_val = sip_header_as_string(nh->nh_home, (void *) sip->sip_path);
+ path_val = sip_header_as_string(nua_handle_home(nh), (void *) sip->sip_path);
path_encoded_len = (strlen(path_val) * 3) + 1;
switch_zmalloc(path_encoded, path_encoded_len);
switch_copy_string(path_encoded, ";fs_path=", 10);
@@ -1117,7 +1117,7 @@
if (exptime) {
switch_snprintf(exp_param, sizeof(exp_param), "expires=%ld", exptime);
- sip_contact_add_param(nh->nh_home, sip->sip_contact, exp_param);
+ sip_contact_add_param(nua_handle_home(nh), sip->sip_contact, exp_param);
if (switch_event_create(&s_event, SWITCH_EVENT_MESSAGE_QUERY) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "Message-Account", "sip:%s@%s", to_user, reg_host);
@@ -1147,10 +1147,10 @@
}
if (sofia_test_pflag(profile, PFLAG_MANAGE_SHARED_APPEARANCE)) {
- char *full_contact = sip_header_as_string(nh->nh_home, (void *) sip->sip_contact);
+ char *full_contact = sip_header_as_string(nua_handle_home(nh), (void *) sip->sip_contact);
if (full_contact && switch_stristr("SUBSCRIBE", full_contact)) {
sofia_sla_handle_register(nua, profile, sip, exptime, full_contact);
- su_free(nh->nh_home, full_contact);
+ su_free(nua_handle_home(nh), full_contact);
}
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_sla.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_sla.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_sla.c Tue Mar 24 12:57:00 2009
@@ -217,7 +217,7 @@
nua_handle_destroy(nh);
sofia_private_free(sofia_private);
} else {
- char *full_contact = sip_header_as_string(nh->nh_home, (void *) sip->sip_contact);
+ char *full_contact = sip_header_as_string(nua_handle_home(nh), (void *) sip->sip_contact);
time_t expires = switch_epoch_time_now(NULL);
char *sql;
char *contact_str = strip_uri(full_contact);
More information about the Freeswitch-trunk
mailing list