rtp fix and some other misc stuff
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2266 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
3b09338cee
commit
54ec8c1dd4
|
@ -586,7 +586,9 @@ static switch_status_t activate_rtp(struct private_object *tech_pvt)
|
|||
}
|
||||
} else {
|
||||
switch_channel_t *channel = switch_core_session_get_channel(tech_pvt->session);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "RTP REPORTS ERROR: [%s]\n", err);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "RTP REPORTS ERROR: [%s][%s:%d]\n", err,
|
||||
tech_pvt->local_sdp_audio_ip,
|
||||
tech_pvt->local_sdp_audio_port);
|
||||
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
||||
switch_set_flag_locked(tech_pvt, TFLAG_BYE);
|
||||
switch_clear_flag_locked(tech_pvt, TFLAG_IO);
|
||||
|
|
|
@ -84,10 +84,6 @@ int main(int argc, char *argv[])
|
|||
nice(-20);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MLOCKALL
|
||||
mlockall(MCL_CURRENT|MCL_FUTURE);
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
if (argv[1] && !strcmp(argv[1], "-stop")) {
|
||||
pid_t pid = 0;
|
||||
|
@ -182,6 +178,11 @@ int main(int argc, char *argv[])
|
|||
switch_event_fire(&event);
|
||||
}
|
||||
|
||||
#ifdef HAVE_MLOCKALL
|
||||
mlockall(MCL_CURRENT|MCL_FUTURE);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CRASH_PROT
|
||||
#define __CP "ENABLED"
|
||||
#else
|
||||
|
|
|
@ -298,8 +298,8 @@ SWITCH_DECLARE(switch_port_t) switch_rtp_request_port(void)
|
|||
switch_mutex_lock(port_lock);
|
||||
port = NEXT_PORT;
|
||||
NEXT_PORT += 2;
|
||||
if (port > RTP_END_PORT) {
|
||||
port = RTP_START_PORT;
|
||||
if (NEXT_PORT > RTP_END_PORT) {
|
||||
NEXT_PORT = RTP_START_PORT;
|
||||
}
|
||||
switch_mutex_unlock(port_lock);
|
||||
return port;
|
||||
|
|
Loading…
Reference in New Issue