mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 21:22:09 +00:00
change CS_DONE to CS_DESTROY and add state handler for destroy and tear down critical parts of the channel from this method which is not called until it's impossible for anything to be referencing the channel (after final write lock and before destroying the pool)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12986 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -874,7 +874,6 @@ SWITCH_DECLARE(unsigned int) switch_core_session_running(switch_core_session_t *
|
||||
return session->thread_running;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(void) switch_core_session_perform_destroy(switch_core_session_t **session, const char *file, const char *func, int line)
|
||||
{
|
||||
switch_memory_pool_t *pool;
|
||||
@@ -905,6 +904,7 @@ SWITCH_DECLARE(void) switch_core_session_perform_destroy(switch_core_session_t *
|
||||
switch_event_fire(&event);
|
||||
}
|
||||
|
||||
switch_core_session_destroy_state(*session);
|
||||
|
||||
switch_buffer_destroy(&(*session)->raw_read_buffer);
|
||||
switch_buffer_destroy(&(*session)->raw_write_buffer);
|
||||
@@ -921,6 +921,8 @@ SWITCH_DECLARE(void) switch_core_session_perform_destroy(switch_core_session_t *
|
||||
UNPROTECT_INTERFACE(endpoint_interface);
|
||||
}
|
||||
|
||||
|
||||
|
||||
SWITCH_STANDARD_SCHED_FUNC(sch_heartbeat_callback)
|
||||
{
|
||||
switch_event_t *event;
|
||||
|
||||
Reference in New Issue
Block a user