mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +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:
@@ -578,6 +578,8 @@ SWITCH_DECLARE(void) switch_core_session_perform_destroy(_Inout_ switch_core_ses
|
||||
*/
|
||||
#define switch_core_session_destroy(session) switch_core_session_perform_destroy(session, __FILE__, __SWITCH_FUNC__, __LINE__)
|
||||
|
||||
SWITCH_DECLARE(void) switch_core_session_destroy_state(switch_core_session_t *session);
|
||||
|
||||
/*!
|
||||
\brief Provide the total number of sessions
|
||||
\return the total number of allocated sessions
|
||||
|
||||
@@ -56,7 +56,8 @@ typedef enum {
|
||||
SWITCH_SHN_ON_HIBERNATE,
|
||||
SWITCH_SHN_ON_RESET,
|
||||
SWITCH_SHN_ON_PARK,
|
||||
SWITCH_SHN_ON_REPORTING
|
||||
SWITCH_SHN_ON_REPORTING,
|
||||
SWITCH_SHN_ON_DESTROY
|
||||
} switch_state_handler_name_t;
|
||||
|
||||
struct switch_state_handler_table {
|
||||
@@ -82,6 +83,8 @@ struct switch_state_handler_table {
|
||||
switch_state_handler_t on_park;
|
||||
/*! executed when the state changes to reporting */
|
||||
switch_state_handler_t on_reporting;
|
||||
/*! executed when the state changes to destroy */
|
||||
switch_state_handler_t on_destroy;
|
||||
void *padding[10];
|
||||
};
|
||||
|
||||
|
||||
@@ -787,7 +787,7 @@ CS_HIBERNATE - Channel is in a sleep state.
|
||||
CS_RESET - Channel is in a reset state.
|
||||
CS_HANGUP - Channel is flagged for hangup and ready to end.
|
||||
CS_REPORTING - Channel is ready to collect call detail.
|
||||
CS_DONE - Channel is ready to be destroyed and out of the state machine
|
||||
CS_DESTROY - Channel is ready to be destroyed and out of the state machine
|
||||
</pre>
|
||||
*/
|
||||
typedef enum {
|
||||
@@ -803,7 +803,7 @@ typedef enum {
|
||||
CS_RESET,
|
||||
CS_HANGUP,
|
||||
CS_REPORTING,
|
||||
CS_DONE,
|
||||
CS_DESTROY,
|
||||
CS_NONE
|
||||
} switch_channel_state_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user