]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
use nua_handle_home instead of using nua internals to get the nua handle home
authorMichael Jerris <mike@jerris.com>
Tue, 24 Mar 2009 17:57:00 +0000 (17:57 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 24 Mar 2009 17:57:00 +0000 (17:57 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12757 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/sofia_reg.c
src/mod/endpoints/mod_sofia/sofia_sla.c

index 661556d51bc6f28d14c434424e8dbd409331de97..ed65a2616c8d090ffcfcc6a137ce5198759cdb18 100644 (file)
@@ -1280,7 +1280,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
 
                                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 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                                                        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());
                                        }
                                }
                        }
index b43a930ca42f0c5ea5940877576091a523f3bdf7..8ba631329f7d298a4101431fb0e101f577f5c397 100644 (file)
@@ -793,7 +793,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
                }
 
                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 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
 
                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 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
                }
 
                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);
                        }
                }
 
index 258fd7ede2ab561c66566d091bfa7d5b9f58f7d9..7dd79f5f26055e7132588fbabae7ff39592f752c 100644 (file)
@@ -217,7 +217,7 @@ void sofia_sla_handle_sip_r_subscribe(int status,
                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);