mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
[mod_sofia] Cleanup usage of sofia-sip headers.
This commit is contained in:
@@ -1935,17 +1935,17 @@ uint8_t sofia_reg_handle_register_token(nua_t *nua, sofia_profile_t *profile, nu
|
||||
switch_mutex_unlock(profile->flag_mutex);
|
||||
|
||||
if (!hnh) {
|
||||
if (!(sofia_private = su_alloc(nh->nh_home, sizeof(*sofia_private)))) {
|
||||
if (!(sofia_private = su_alloc(nua_handle_get_home(nh), sizeof(*sofia_private)))) {
|
||||
abort();
|
||||
}
|
||||
|
||||
memset(sofia_private, 0, sizeof(*sofia_private));
|
||||
sofia_private->call_id = su_strdup(nh->nh_home, call_id);
|
||||
sofia_private->network_ip = su_strdup(nh->nh_home, network_ip);
|
||||
sofia_private->network_port = su_strdup(nh->nh_home, network_port_c);
|
||||
sofia_private->key = su_strdup(nh->nh_home, key);
|
||||
sofia_private->user = su_strdup(nh->nh_home, to_user);
|
||||
sofia_private->realm = su_strdup(nh->nh_home, reg_host);
|
||||
sofia_private->call_id = su_strdup(nua_handle_get_home(nh), call_id);
|
||||
sofia_private->network_ip = su_strdup(nua_handle_get_home(nh), network_ip);
|
||||
sofia_private->network_port = su_strdup(nua_handle_get_home(nh), network_port_c);
|
||||
sofia_private->key = su_strdup(nua_handle_get_home(nh), key);
|
||||
sofia_private->user = su_strdup(nua_handle_get_home(nh), to_user);
|
||||
sofia_private->realm = su_strdup(nua_handle_get_home(nh), reg_host);
|
||||
|
||||
sofia_private->is_static++;
|
||||
*sofia_private_p = sofia_private;
|
||||
@@ -2426,12 +2426,12 @@ void sofia_reg_handle_sip_r_register(int status,
|
||||
char *full;
|
||||
|
||||
for (; contact; contact = contact->m_next) {
|
||||
if ((full = sip_header_as_string(nh->nh_home, (void *) contact))) {
|
||||
if ((full = sip_header_as_string(nua_handle_get_home(nh), (void *) contact))) {
|
||||
if (switch_stristr(gateway->register_contact, full)) {
|
||||
break;
|
||||
}
|
||||
|
||||
su_free(nh->nh_home, full);
|
||||
su_free(nua_handle_get_home(nh), full);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user