add session counter and make all sessions hang up elegantly on shutdown

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1788 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-07-07 18:59:14 +00:00
parent ecb7c08923
commit b5a19020f7
6 changed files with 110 additions and 6 deletions
+12
View File
@@ -116,6 +116,13 @@ struct switch_core_runtime;
*/
SWITCH_DECLARE(switch_status_t) switch_core_init(char *console, const char **err);
/*!
\brief Set/Get Session Limit
\param new new value (if > 0)
\return the current session limit
*/
SWITCH_DECLARE(uint32_t) switch_core_session_limit(uint32_t new);
/*!
\brief Destroy the core
\note to be called at application shutdown
@@ -309,6 +316,11 @@ SWITCH_DECLARE(char *) switch_core_session_get_uuid(switch_core_session_t *sessi
*/
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_locate(char *uuid_str);
/*!
\brief Hangup All Sessions
*/
SWITCH_DECLARE(void) switch_core_session_hupall(void);
/*!
\brief Send a message to another session using it's uuid
\param uuid_str the unique id of the session you want to send a message to
+2 -1
View File
@@ -619,7 +619,8 @@ typedef enum {
SWITCH_CAUSE_MANDATORY_IE_LENGTH_ERROR = 103,
SWITCH_CAUSE_PROTOCOL_ERROR = 111,
SWITCH_CAUSE_INTERWORKING = 127,
SWITCH_CAUSE_CRASH = 500
SWITCH_CAUSE_CRASH = 500,
SWITCH_CAUSE_SYSTEM_SHUTDOWN = 501
} switch_call_cause_t;