FS-10387: [core] High memory usage with mod_sofia, osmo-nitb and DTX setting active #resolve
This commit is contained in:
parent
0a69fc7ecc
commit
094edeea2e
|
@ -670,6 +670,7 @@ SWITCH_DECLARE(void) switch_channel_process_device_hangup(switch_channel_t *chan
|
|||
SWITCH_DECLARE(switch_caller_extension_t *) switch_channel_get_queued_extension(switch_channel_t *channel);
|
||||
SWITCH_DECLARE(void) switch_channel_transfer_to_extension(switch_channel_t *channel, switch_caller_extension_t *caller_extension);
|
||||
SWITCH_DECLARE(const char *) switch_channel_get_partner_uuid(switch_channel_t *channel);
|
||||
SWITCH_DECLARE(const char *) switch_channel_get_partner_uuid_copy(switch_channel_t *channel, char *buf, switch_size_t blen);
|
||||
SWITCH_DECLARE(switch_hold_record_t *) switch_channel_get_hold_record(switch_channel_t *channel);
|
||||
SWITCH_DECLARE(void) switch_channel_state_thread_lock(switch_channel_t *channel);
|
||||
SWITCH_DECLARE(void) switch_channel_state_thread_unlock(switch_channel_t *channel);
|
||||
|
|
|
@ -4674,6 +4674,25 @@ SWITCH_DECLARE(switch_status_t) switch_channel_set_timestamps(switch_channel_t *
|
|||
return status;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(const char *) switch_channel_get_partner_uuid_copy(switch_channel_t *channel, char *buf, switch_size_t blen)
|
||||
{
|
||||
const char *uuid = NULL;
|
||||
|
||||
switch_mutex_lock(channel->profile_mutex);
|
||||
if (!(uuid = switch_channel_get_variable_dup(channel, SWITCH_SIGNAL_BOND_VARIABLE, SWITCH_TRUE, -1))) {
|
||||
uuid = switch_channel_get_variable_dup(channel, SWITCH_ORIGINATE_SIGNAL_BOND_VARIABLE, SWITCH_TRUE, -1);
|
||||
}
|
||||
|
||||
if (uuid) {
|
||||
strncpy(buf, uuid, blen);
|
||||
uuid = (const char *) buf;
|
||||
}
|
||||
switch_mutex_unlock(channel->profile_mutex);
|
||||
|
||||
return uuid;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(const char *) switch_channel_get_partner_uuid(switch_channel_t *channel)
|
||||
{
|
||||
const char *uuid = NULL;
|
||||
|
|
|
@ -190,8 +190,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_get_partner(switch_c
|
|||
const char *file, const char *func, int line)
|
||||
{
|
||||
const char *uuid;
|
||||
char uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1];
|
||||
|
||||
if ((uuid = switch_channel_get_partner_uuid(session->channel))) {
|
||||
if ((uuid = switch_channel_get_partner_uuid_copy(session->channel, uuid_str, sizeof(uuid_str)))) {
|
||||
if ((*partner = switch_core_session_perform_locate(uuid, file, func, line))) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue