add more code to free rtp ports

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6913 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2007-12-20 15:41:45 +00:00
1 parent 69b726ec1b
commit 36d84006eb
4 files changed
+19 -7

No files matched your search

@@ -687,6 +687,11 @@ static void terminate_session(switch_core_session_t **session, int line, switch_
tech_pvt = switch_core_session_get_private(*session);
if (tech_pvt->profile->ip && tech_pvt->local_port) {
switch_rtp_release_port(tech_pvt->profile->ip, tech_pvt->local_port);
}
if (!switch_core_session_running(*session) && (!tech_pvt || !switch_test_flag(tech_pvt, TFLAG_READY))) {
switch_core_session_destroy(session);
return;
@@ -1209,6 +1214,10 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
tech_pvt = switch_core_session_get_private(session);
switch_assert(tech_pvt != NULL);
if (tech_pvt->profile->ip && tech_pvt->local_port) {
switch_rtp_release_port(tech_pvt->profile->ip, tech_pvt->local_port);
}
switch_clear_flag_locked(tech_pvt, TFLAG_IO);
switch_clear_flag_locked(tech_pvt, TFLAG_VOICE);
switch_set_flag_locked(tech_pvt, TFLAG_BYE);
+4 -1
View File
@@ -201,7 +201,10 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
tech_pvt = (private_object_t *) switch_core_session_get_private(session);
switch_assert(tech_pvt != NULL);
if (tech_pvt->profile->rtpip && tech_pvt->local_sdp_audio_port) {
switch_rtp_release_port(tech_pvt->profile->rtpip, tech_pvt->local_sdp_audio_port);
}
if (switch_test_flag(tech_pvt, TFLAG_SIP_HOLD)) {
const char *buuid;