[Freeswitch-svn] [commit] r4147 - in freeswitch/trunk/src: . include
Freeswitch SVN
anthm at freeswitch.org
Wed Feb 7 12:19:07 EST 2007
Author: anthm
Date: Wed Feb 7 12:19:06 2007
New Revision: 4147
Modified:
freeswitch/trunk/src/include/switch_caller.h
freeswitch/trunk/src/switch_channel.c
freeswitch/trunk/src/switch_rtp.c
Log:
update
Modified: freeswitch/trunk/src/include/switch_caller.h
==============================================================================
--- freeswitch/trunk/src/include/switch_caller.h (original)
+++ freeswitch/trunk/src/include/switch_caller.h Wed Feb 7 12:19:06 2007
@@ -91,6 +91,7 @@
struct switch_caller_profile *originator_caller_profile;
struct switch_caller_profile *originatee_caller_profile;
struct switch_channel_timetable *times;
+ struct switch_caller_extension *caller_extension;
struct switch_caller_profile *next;
};
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Wed Feb 7 12:19:06 2007
@@ -109,7 +109,6 @@
uint32_t flags;
uint32_t state_flags;
switch_caller_profile_t *caller_profile;
- switch_caller_extension_t *caller_extension;
const switch_state_handler_table_t *state_handlers[SWITCH_MAX_STATE_HANDLERS];
int state_handler_index;
switch_hash_t *variables;
@@ -921,17 +920,21 @@
assert(channel != NULL);
switch_mutex_lock(channel->profile_mutex);
- caller_extension->next = channel->caller_extension;
- channel->caller_extension = caller_extension;
+ caller_extension->next = channel->caller_profile->caller_extension;
+ channel->caller_profile->caller_extension = caller_extension;
switch_mutex_unlock(channel->profile_mutex);
}
SWITCH_DECLARE(switch_caller_extension_t *) switch_channel_get_caller_extension(switch_channel_t *channel)
{
+ switch_caller_extension_t *extension;
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;
}
Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c (original)
+++ freeswitch/trunk/src/switch_rtp.c Wed Feb 7 12:19:06 2007
@@ -756,39 +756,6 @@
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) {
check = (uint8_t)(switch_core_timer_check(&rtp_session->timer) == SWITCH_STATUS_SUCCESS);
}
More information about the Freeswitch-svn
mailing list