提交 068ced69 authored 作者: Anthony Minessale's avatar Anthony Minessale

update

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4147 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 8ae55858
...@@ -91,6 +91,7 @@ struct switch_caller_profile { ...@@ -91,6 +91,7 @@ struct switch_caller_profile {
struct switch_caller_profile *originator_caller_profile; struct switch_caller_profile *originator_caller_profile;
struct switch_caller_profile *originatee_caller_profile; struct switch_caller_profile *originatee_caller_profile;
struct switch_channel_timetable *times; struct switch_channel_timetable *times;
struct switch_caller_extension *caller_extension;
struct switch_caller_profile *next; struct switch_caller_profile *next;
}; };
......
...@@ -109,7 +109,6 @@ struct switch_channel { ...@@ -109,7 +109,6 @@ struct switch_channel {
uint32_t flags; uint32_t flags;
uint32_t state_flags; uint32_t state_flags;
switch_caller_profile_t *caller_profile; switch_caller_profile_t *caller_profile;
switch_caller_extension_t *caller_extension;
const switch_state_handler_table_t *state_handlers[SWITCH_MAX_STATE_HANDLERS]; const switch_state_handler_table_t *state_handlers[SWITCH_MAX_STATE_HANDLERS];
int state_handler_index; int state_handler_index;
switch_hash_t *variables; switch_hash_t *variables;
...@@ -921,17 +920,21 @@ SWITCH_DECLARE(void) switch_channel_set_caller_extension(switch_channel_t *chann ...@@ -921,17 +920,21 @@ SWITCH_DECLARE(void) switch_channel_set_caller_extension(switch_channel_t *chann
assert(channel != NULL); assert(channel != NULL);
switch_mutex_lock(channel->profile_mutex); switch_mutex_lock(channel->profile_mutex);
caller_extension->next = channel->caller_extension; caller_extension->next = channel->caller_profile->caller_extension;
channel->caller_extension = caller_extension; channel->caller_profile->caller_extension = caller_extension;
switch_mutex_unlock(channel->profile_mutex); switch_mutex_unlock(channel->profile_mutex);
} }
SWITCH_DECLARE(switch_caller_extension_t *) switch_channel_get_caller_extension(switch_channel_t *channel) SWITCH_DECLARE(switch_caller_extension_t *) switch_channel_get_caller_extension(switch_channel_t *channel)
{ {
switch_caller_extension_t *extension;
assert(channel != NULL); assert(channel != NULL);
return channel->caller_extension; switch_mutex_lock(channel->profile_mutex);
extension = channel->caller_profile->caller_extension;
switch_mutex_unlock(channel->profile_mutex);
return extension;
} }
......
...@@ -756,39 +756,6 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_ ...@@ -756,39 +756,6 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
bytes = sbytes; bytes = sbytes;
} }
if (bytes > 0 && rtp_session->recv_msg.header.version == 2) {
uint32_t effective_size = (uint32_t)(bytes - rtp_header_len);
uint32_t new_ms = 0, old_size = 0;
if (effective_size && rtp_session->packet_size && rtp_session->recv_msg.header.pt == rtp_session->payload &&
effective_size != rtp_session->packet_size) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Configured packet size %u != inbound packet size %u: auto-correcting..\n",
rtp_session->packet_size,
effective_size
);
old_size = rtp_session->packet_size;
new_ms = (((rtp_session->ms_per_packet / 1000) * effective_size) / old_size);
rtp_session->ms_per_packet = new_ms * 1000;
rtp_session->packet_size = effective_size;
if (rtp_session->timer.timer_interface) {
switch_core_timer_destroy(&rtp_session->timer);
if (!switch_strlen_zero(rtp_session->timer_name)) {
if (switch_core_timer_init(&rtp_session->timer,
rtp_session->timer_name,
rtp_session->ms_per_packet / 1000,
rtp_session->packet_size,
rtp_session->pool) == SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Starting timer [%s] %d bytes per %dms\n",
rtp_session->timer_name, rtp_session->packet_size, rtp_session->ms_per_packet / 1000);
}
}
}
}
}
if (rtp_session->timer.interval) { if (rtp_session->timer.interval) {
check = (uint8_t)(switch_core_timer_check(&rtp_session->timer) == SWITCH_STATUS_SUCCESS); check = (uint8_t)(switch_core_timer_check(&rtp_session->timer) == SWITCH_STATUS_SUCCESS);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论