fix a bunch of stuff

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7854 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-03-11 03:45:16 +00:00
parent dc5c28e1f9
commit 74a3d8ab95
17 changed files with 139 additions and 65 deletions

View File

@@ -879,14 +879,12 @@ SWITCH_DECLARE(void) switch_rtp_destroy(switch_rtp_t **rtp_session)
void *pop;
switch_socket_t *sock;
switch_mutex_lock((*rtp_session)->flag_mutex);
if (!rtp_session || !*rtp_session || !(*rtp_session)->ready) {
switch_mutex_unlock((*rtp_session)->flag_mutex);
return;
}
switch_mutex_lock((*rtp_session)->flag_mutex);
READ_INC((*rtp_session));
WRITE_INC((*rtp_session));
@@ -1122,7 +1120,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
bytes = sizeof(rtp_msg_t);
status = switch_socket_recvfrom(rtp_session->from_addr, rtp_session->sock, 0, (void *) &rtp_session->recv_msg, &bytes);
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_BREAK)) {
switch_clear_flag_locked(rtp_session, SWITCH_RTP_FLAG_BREAK);
bytes = 0;
@@ -1293,7 +1291,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
if (rtp_session->timer.interval) {
check = (uint8_t) (switch_core_timer_check(&rtp_session->timer) == SWITCH_STATUS_SUCCESS);
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTO_CNG) &&
rtp_session->timer.samplecount >= (rtp_session->last_write_samplecount + (rtp_session->samples_per_interval * 50))) {
uint8_t data[10] = { 0 };