mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 20:50:41 +00:00
FS-10387: [core] High memory usage with mod_sofia, osmo-nitb and DTX setting active #resolve
This commit is contained in:
parent
7c19615890
commit
e78f3f0c04
@ -678,6 +678,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(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(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(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(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_lock(switch_channel_t *channel);
|
||||||
SWITCH_DECLARE(void) switch_channel_state_thread_unlock(switch_channel_t *channel);
|
SWITCH_DECLARE(void) switch_channel_state_thread_unlock(switch_channel_t *channel);
|
||||||
|
@ -4687,6 +4687,25 @@ SWITCH_DECLARE(switch_status_t) switch_channel_set_timestamps(switch_channel_t *
|
|||||||
return status;
|
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)
|
SWITCH_DECLARE(const char *) switch_channel_get_partner_uuid(switch_channel_t *channel)
|
||||||
{
|
{
|
||||||
const char *uuid = NULL;
|
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 *file, const char *func, int line)
|
||||||
{
|
{
|
||||||
const char *uuid;
|
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))) {
|
if ((*partner = switch_core_session_perform_locate(uuid, file, func, line))) {
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user