mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
add cumulative count of sessions from switch startup. Resolves http://jira.freeswitch.org/browse/FSCORE-18. Updated patch to change data type of session_id to avoid rollover (wouldn't that be nice) and added - 1 to accurately reflect count. Thanks bkw for the patch.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4999 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -40,7 +40,7 @@ static struct {
|
||||
switch_mutex_t *session_table_mutex;
|
||||
uint32_t session_count;
|
||||
uint32_t session_limit;
|
||||
uint32_t session_id;
|
||||
switch_size_t session_id;
|
||||
} runtime;
|
||||
|
||||
|
||||
@@ -820,6 +820,12 @@ SWITCH_DECLARE(uint32_t) switch_core_session_count(void)
|
||||
return runtime.session_count;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_size_t) switch_core_session_id(void)
|
||||
{
|
||||
return runtime.session_id;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(char *endpoint_name, switch_memory_pool_t **pool)
|
||||
{
|
||||
const switch_endpoint_interface_t *endpoint_interface;
|
||||
|
||||
Reference in New Issue
Block a user