switch_core_pvt.h File Reference

#include "spandsp.h"
#include "switch_profile.h"
#include <switch_private.h>
#include <apr_pools.h>
#include <apr_hash.h>
#include <apr_strings.h>
#include <apr_general.h>
#include <apr_portable.h>
#include <unistd.h>
#include <pwd.h>
#include <grp.h>

Include dependency graph for switch_core_pvt.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  switch_core_session
struct  switch_media_bug
struct  switch_runtime
struct  switch_session_manager

Defines

#define SPANDSP_NO_TIFF   1
#define DO_EVENTS
#define SWITCH_EVENT_QUEUE_LEN   256
#define SWITCH_MESSAGE_QUEUE_LEN   256
#define SWITCH_BUFFER_BLOCK_FRAMES   25
#define SWITCH_BUFFER_START_FRAMES   50

Enumerations

enum  switch_session_flag_t {
  SSF_NONE = 0, SSF_DESTROYED = (1 << 0), SSF_WARN_TRANSCODE = (1 << 1), SSF_HANGUP = (1 << 2),
  SSF_THREAD_STARTED = (1 << 3), SSF_THREAD_RUNNING = (1 << 4), SSF_READ_TRANSCODE = (1 << 5), SSF_WRITE_TRANSCODE = (1 << 6),
  SSF_READ_CODEC_RESET = (1 << 7), SSF_WRITE_CODEC_RESET = (1 << 8)
}
enum  switch_dbtype_t { DBTYPE_DEFAULT = 0, DBTYPE_MSSQL = 1 }

Functions

switch_status_t switch_core_sqldb_start (switch_memory_pool_t *pool, switch_bool_t manage)
void switch_core_sqldb_stop (void)
void switch_core_session_init (switch_memory_pool_t *pool)
void switch_core_session_uninit (void)
void switch_core_state_machine_init (switch_memory_pool_t *pool)
switch_memory_pool_tswitch_core_memory_init (void)
void switch_core_memory_stop (void)

Variables

switch_runtime runtime
switch_session_manager session_manager


Define Documentation

#define DO_EVENTS

Definition at line 83 of file switch_core_pvt.h.

#define SPANDSP_NO_TIFF   1

Definition at line 34 of file switch_core_pvt.h.

#define SWITCH_BUFFER_BLOCK_FRAMES   25

Definition at line 88 of file switch_core_pvt.h.

Referenced by switch_core_media_bug_add(), and switch_core_session_write_frame().

#define SWITCH_BUFFER_START_FRAMES   50

Definition at line 89 of file switch_core_pvt.h.

Referenced by switch_core_media_bug_add(), and switch_core_session_write_frame().

#define SWITCH_EVENT_QUEUE_LEN   256

Definition at line 85 of file switch_core_pvt.h.

Referenced by switch_core_session_request_uuid().

#define SWITCH_MESSAGE_QUEUE_LEN   256

Definition at line 86 of file switch_core_pvt.h.

Referenced by switch_core_session_request_uuid().


Enumeration Type Documentation

enum switch_dbtype_t

Enumerator:
DBTYPE_DEFAULT 
DBTYPE_MSSQL 

Definition at line 209 of file switch_core_pvt.h.

00209              {
00210         DBTYPE_DEFAULT = 0,
00211         DBTYPE_MSSQL = 1,
00212 } switch_dbtype_t;

enum switch_session_flag_t

Enumerator:
SSF_NONE 
SSF_DESTROYED 
SSF_WARN_TRANSCODE 
SSF_HANGUP 
SSF_THREAD_STARTED 
SSF_THREAD_RUNNING 
SSF_READ_TRANSCODE 
SSF_WRITE_TRANSCODE 
SSF_READ_CODEC_RESET 
SSF_WRITE_CODEC_RESET 

Definition at line 91 of file switch_core_pvt.h.

00091              {
00092         SSF_NONE = 0,
00093         SSF_DESTROYED = (1 << 0),
00094         SSF_WARN_TRANSCODE = (1 << 1),
00095         SSF_HANGUP = (1 << 2),
00096         SSF_THREAD_STARTED = (1 << 3),
00097         SSF_THREAD_RUNNING = (1 << 4),
00098         SSF_READ_TRANSCODE = (1 << 5),
00099         SSF_WRITE_TRANSCODE = (1 << 6),
00100         SSF_READ_CODEC_RESET = (1 << 7),
00101         SSF_WRITE_CODEC_RESET = (1 << 8)
00102 } switch_session_flag_t;


Function Documentation

switch_memory_pool_t* switch_core_memory_init ( void   ) 

Definition at line 598 of file switch_core_memory.c.

References memory_manager, pool_thread(), pool_thread_p, switch_assert, switch_cond_next(), switch_mutex_init(), SWITCH_MUTEX_NESTED, switch_queue_create(), switch_thread_create(), SWITCH_THREAD_STACKSIZE, switch_threadattr_create(), switch_threadattr_detach_set(), and switch_threadattr_stacksize_set().

Referenced by switch_core_init().

00599 {
00600 #ifndef INSTANTLY_DESTROY_POOLS
00601         switch_threadattr_t *thd_attr;
00602 #endif
00603 #ifdef PER_POOL_LOCK
00604         apr_allocator_t *my_allocator = NULL;
00605         apr_thread_mutex_t *my_mutex;
00606 #endif
00607 
00608         memset(&memory_manager, 0, sizeof(memory_manager));
00609 
00610 #ifdef PER_POOL_LOCK
00611         if ((apr_allocator_create(&my_allocator)) != APR_SUCCESS) {
00612                 abort();
00613         }
00614 
00615         if ((apr_pool_create_ex(&memory_manager.memory_pool, NULL, NULL, my_allocator)) != APR_SUCCESS) {
00616                 apr_allocator_destroy(my_allocator);
00617                 my_allocator = NULL;
00618                 abort();
00619         }
00620 
00621         if ((apr_thread_mutex_create(&my_mutex, APR_THREAD_MUTEX_NESTED, memory_manager.memory_pool)) != APR_SUCCESS) {
00622                 abort();
00623         }
00624 
00625         apr_allocator_mutex_set(my_allocator, my_mutex);
00626         apr_pool_mutex_set(memory_manager.memory_pool, my_mutex);
00627         apr_allocator_owner_set(my_allocator, memory_manager.memory_pool);
00628         apr_pool_tag(memory_manager.memory_pool, "core_pool");
00629 #else
00630         apr_pool_create(&memory_manager.memory_pool, NULL);
00631         switch_assert(memory_manager.memory_pool != NULL);
00632 #endif
00633 
00634 #ifdef USE_MEM_LOCK
00635         switch_mutex_init(&memory_manager.mem_lock, SWITCH_MUTEX_NESTED, memory_manager.memory_pool);
00636 #endif
00637 
00638 #ifdef INSTANTLY_DESTROY_POOLS
00639         {
00640                 void *foo;
00641                 foo = (void *) (intptr_t) pool_thread;
00642         }
00643 #else
00644 
00645         switch_queue_create(&memory_manager.pool_queue, 50000, memory_manager.memory_pool);
00646         switch_queue_create(&memory_manager.pool_recycle_queue, 50000, memory_manager.memory_pool);
00647 
00648         switch_threadattr_create(&thd_attr, memory_manager.memory_pool);
00649         switch_threadattr_detach_set(thd_attr, 1);
00650 
00651         switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
00652         switch_thread_create(&pool_thread_p, thd_attr, pool_thread, NULL, memory_manager.memory_pool);
00653 
00654         while (!memory_manager.pool_thread_running) {
00655                 switch_cond_next();
00656         }
00657 #endif
00658 
00659         return memory_manager.memory_pool;
00660 }

void switch_core_memory_stop ( void   ) 

Definition at line 586 of file switch_core_memory.c.

References memory_manager, pool_thread_p, SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, switch_log_printf(), and switch_thread_join().

Referenced by switch_core_destroy().

00587 {
00588 #ifndef INSTANTLY_DESTROY_POOLS
00589         switch_status_t st;
00590 
00591         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Stopping memory pool queue.\n");
00592 
00593         memory_manager.pool_thread_running = 0;
00594         switch_thread_join(&st, pool_thread_p);
00595 #endif
00596 }

void switch_core_session_init ( switch_memory_pool_t pool  ) 

Definition at line 2036 of file switch_core_session.c.

References session_manager, and switch_core_hash_init.

Referenced by switch_core_init().

02037 {
02038         memset(&session_manager, 0, sizeof(session_manager));
02039         session_manager.session_limit = 1000;
02040         session_manager.session_id = 1;
02041         session_manager.memory_pool = pool;
02042         switch_core_hash_init(&session_manager.session_table, session_manager.memory_pool);
02043 }

void switch_core_session_uninit ( void   ) 

Definition at line 2045 of file switch_core_session.c.

References session_manager, switch_session_manager::session_table, and switch_core_hash_destroy().

switch_status_t switch_core_sqldb_start ( switch_memory_pool_t pool,
switch_bool_t  manage 
)

Definition at line 1927 of file switch_core_sqldb.c.

References basic_calls_sql, core_event_handler(), create_alias_sql, create_calls_sql, create_channels_sql, create_complete_sql, create_interfaces_sql, create_nat_sql, create_registrations_sql, create_tasks_sql, DBTYPE_DEFAULT, detailed_calls_sql, switch_runtime::odbc_dbtype, switch_runtime::odbc_dsn, switch_runtime::odbc_pass, switch_runtime::odbc_user, runtime, SCDB_TYPE_CORE_DB, SCDB_TYPE_ODBC, SCF_CLEAR_SQL, SCF_CORE_ODBC_REQ, SCF_USE_SQL, skip(), sql_manager, switch_cache_db_execute_sql(), switch_cache_db_release_db_handle(), switch_cache_db_test_reactive(), SWITCH_CHANNEL_LOG, switch_clear_flag, switch_core_db_handle, switch_core_get_switchname(), switch_core_sql_db_thread(), switch_core_sql_thread(), SWITCH_EVENT_ALL, switch_event_bind_removable(), SWITCH_EVENT_SUBCLASS_ANY, SWITCH_LOG_CRIT, SWITCH_LOG_ERROR, SWITCH_LOG_INFO, switch_log_printf(), SWITCH_LOG_WARNING, switch_mutex_init(), SWITCH_MUTEX_NESTED, switch_queue_create(), switch_snprintfv(), SWITCH_SQL_QUEUE_LEN, SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_string_replace(), switch_test_flag, switch_thread_cond_create(), switch_thread_create(), SWITCH_THREAD_STACKSIZE, switch_threadattr_create(), switch_threadattr_stacksize_set(), switch_yield, and switch_cache_db_handle::type.

Referenced by switch_core_init().

01928 {
01929         switch_threadattr_t *thd_attr;
01930         switch_cache_db_handle_t *dbh;
01931         uint32_t sanity = 400;
01932 
01933         sql_manager.memory_pool = pool;
01934         sql_manager.manage = manage;
01935 
01936         switch_mutex_init(&sql_manager.dbh_mutex, SWITCH_MUTEX_NESTED, sql_manager.memory_pool);
01937         switch_mutex_init(&sql_manager.io_mutex, SWITCH_MUTEX_NESTED, sql_manager.memory_pool);
01938         switch_mutex_init(&sql_manager.cond_mutex, SWITCH_MUTEX_NESTED, sql_manager.memory_pool);
01939 
01940         switch_thread_cond_create(&sql_manager.cond, sql_manager.memory_pool);
01941 
01942  top:
01943 
01944         if (!sql_manager.manage) goto skip;
01945 
01946         /* Activate SQL database */
01947         if (switch_core_db_handle(&dbh) != SWITCH_STATUS_SUCCESS) {
01948                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB!\n");
01949 
01950                 if (switch_test_flag((&runtime), SCF_CORE_ODBC_REQ)) {
01951                         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Failure! ODBC IS REQUIRED!\n");
01952                         return SWITCH_STATUS_FALSE;
01953                 }
01954 
01955                 if (runtime.odbc_dsn) {
01956                         runtime.odbc_dsn = NULL;
01957                         runtime.odbc_user = NULL;
01958                         runtime.odbc_pass = NULL;
01959                         runtime.odbc_dbtype = DBTYPE_DEFAULT;
01960                         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Falling back to core_db.\n");
01961                         goto top;
01962                 }
01963 
01964 
01965                 switch_clear_flag((&runtime), SCF_USE_SQL);
01966                 return SWITCH_STATUS_FALSE;
01967         }
01968 
01969 
01970         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Opening DB\n");
01971 
01972         switch (dbh->type) {
01973         case SCDB_TYPE_ODBC:
01974                 if (switch_test_flag((&runtime), SCF_CLEAR_SQL)) {
01975                         char sql[512] = "";
01976                         char *tables[] = { "channels", "calls", "interfaces", "tasks", NULL };
01977                         int i;
01978                         const char *hostname = switch_core_get_switchname();
01979 
01980                         for (i = 0; tables[i]; i++) {
01981                                 switch_snprintfv(sql, sizeof(sql), "delete from %q where hostname='%q'", tables[i], hostname);
01982                                 switch_cache_db_execute_sql(dbh, sql, NULL);
01983                         }
01984                 }
01985                 break;
01986         case SCDB_TYPE_CORE_DB:
01987                 {
01988                         switch_cache_db_execute_sql(dbh, "drop table channels", NULL);
01989                         switch_cache_db_execute_sql(dbh, "drop table calls", NULL);
01990                         switch_cache_db_execute_sql(dbh, "drop view detailed_calls", NULL);
01991                         switch_cache_db_execute_sql(dbh, "drop view basic_calls", NULL);
01992                         switch_cache_db_execute_sql(dbh, "drop table interfaces", NULL);
01993                         switch_cache_db_execute_sql(dbh, "drop table tasks", NULL);
01994                         switch_cache_db_execute_sql(dbh, "PRAGMA synchronous=OFF;", NULL);
01995                         switch_cache_db_execute_sql(dbh, "PRAGMA count_changes=OFF;", NULL);
01996                         switch_cache_db_execute_sql(dbh, "PRAGMA default_cache_size=8000", NULL);
01997                         switch_cache_db_execute_sql(dbh, "PRAGMA temp_store=MEMORY;", NULL);
01998                         switch_cache_db_execute_sql(dbh, "PRAGMA journal_mode=OFF;", NULL);
01999                 }
02000                 break;
02001         }
02002 
02003 
02004         switch_cache_db_test_reactive(dbh, "select hostname from complete", "DROP TABLE complete", create_complete_sql);
02005         switch_cache_db_test_reactive(dbh, "select hostname from aliases", "DROP TABLE aliases", create_alias_sql);
02006         switch_cache_db_test_reactive(dbh, "select hostname from nat", "DROP TABLE nat", create_nat_sql);
02007         switch_cache_db_test_reactive(dbh, "delete from registrations where reg_user='' or network_proto='tcp' or network_proto='tls'", 
02008                                                                   "DROP TABLE registrations", create_registrations_sql);
02009 
02010 
02011         switch (dbh->type) {
02012         case SCDB_TYPE_ODBC:
02013                 {
02014                         char *err;
02015                         switch_cache_db_test_reactive(dbh, "select call_uuid, read_bit_rate, sent_callee_name from channels", "DROP TABLE channels", create_channels_sql);
02016                         switch_cache_db_test_reactive(dbh, "select * from detailed_calls where sent_callee_name=''", "DROP VIEW detailed_calls", detailed_calls_sql);
02017                         switch_cache_db_test_reactive(dbh, "select * from basic_calls where sent_callee_name=''", "DROP VIEW basic_calls", basic_calls_sql);
02018                         switch_cache_db_test_reactive(dbh, "select call_uuid from calls", "DROP TABLE calls", create_calls_sql);
02019                         if (runtime.odbc_dbtype == DBTYPE_DEFAULT) {
02020                                 switch_cache_db_test_reactive(dbh, "delete from registrations where reg_user='' or network_proto='tcp' or network_proto='tls'", 
02021                                                                                           "DROP TABLE registrations", create_registrations_sql);
02022                         } else {
02023                                 char *tmp = switch_string_replace(create_registrations_sql, "url      TEXT", "url      VARCHAR(max)");
02024                                 switch_cache_db_test_reactive(dbh, "delete from registrations where reg_user='' or network_proto='tcp' or network_proto='tls'", 
02025                                                                                           "DROP TABLE registrations", tmp);
02026                                 free(tmp);
02027                         }
02028                         switch_cache_db_test_reactive(dbh, "select ikey from interfaces", "DROP TABLE interfaces", create_interfaces_sql);
02029                         switch_cache_db_test_reactive(dbh, "select hostname from tasks", "DROP TABLE tasks", create_tasks_sql);
02030 
02031                         if (runtime.odbc_dbtype == DBTYPE_DEFAULT) {
02032                                 switch_cache_db_execute_sql(dbh, "begin;delete from channels where hostname='';delete from channels where hostname='';commit;", &err);
02033                         } else {
02034                                 switch_cache_db_execute_sql(dbh, "delete from channels where hostname='';delete from channels where hostname='';", &err);
02035                         }
02036 
02037                         if (err) {
02038                                 runtime.odbc_dsn = NULL;
02039                                 runtime.odbc_user = NULL;
02040                                 runtime.odbc_pass = NULL;
02041                                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Transactions not supported on your DB, disabling ODBC\n");
02042                                 switch_cache_db_release_db_handle(&dbh);
02043                                 free(err);
02044                                 goto top;
02045                         }
02046                 }
02047                 break;
02048         case SCDB_TYPE_CORE_DB:
02049                 {
02050                         switch_cache_db_execute_sql(dbh, create_channels_sql, NULL);
02051                         switch_cache_db_execute_sql(dbh, create_calls_sql, NULL);
02052                         switch_cache_db_execute_sql(dbh, create_interfaces_sql, NULL);
02053                         switch_cache_db_execute_sql(dbh, create_tasks_sql, NULL);
02054                         switch_cache_db_execute_sql(dbh, detailed_calls_sql, NULL);
02055                         switch_cache_db_execute_sql(dbh, basic_calls_sql, NULL);
02056                 }
02057                 break;
02058         }
02059 
02060 
02061         switch_cache_db_execute_sql(dbh, "delete from complete where sticky=0", NULL);
02062         switch_cache_db_execute_sql(dbh, "delete from aliases where sticky=0", NULL);
02063         switch_cache_db_execute_sql(dbh, "delete from nat where sticky=0", NULL);
02064         switch_cache_db_execute_sql(dbh, "create index alias1 on aliases (alias)", NULL);
02065         switch_cache_db_execute_sql(dbh, "create index tasks1 on tasks (hostname,task_id)", NULL);
02066         switch_cache_db_execute_sql(dbh, "create index complete1 on complete (a1,hostname)", NULL);
02067         switch_cache_db_execute_sql(dbh, "create index complete2 on complete (a2,hostname)", NULL);
02068         switch_cache_db_execute_sql(dbh, "create index complete3 on complete (a3,hostname)", NULL);
02069         switch_cache_db_execute_sql(dbh, "create index complete4 on complete (a4,hostname)", NULL);
02070         switch_cache_db_execute_sql(dbh, "create index complete5 on complete (a5,hostname)", NULL);
02071         switch_cache_db_execute_sql(dbh, "create index complete6 on complete (a6,hostname)", NULL);
02072         switch_cache_db_execute_sql(dbh, "create index complete7 on complete (a7,hostname)", NULL);
02073         switch_cache_db_execute_sql(dbh, "create index complete8 on complete (a8,hostname)", NULL);
02074         switch_cache_db_execute_sql(dbh, "create index complete9 on complete (a9,hostname)", NULL);
02075         switch_cache_db_execute_sql(dbh, "create index complete10 on complete (a10,hostname)", NULL);
02076         switch_cache_db_execute_sql(dbh, "create index complete11 on complete (a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,hostname)", NULL);
02077         switch_cache_db_execute_sql(dbh, "create index nat_map_port_proto on nat (port,proto,hostname)", NULL);
02078         switch_cache_db_execute_sql(dbh, "create index channels1 on channels(hostname)", NULL);
02079         switch_cache_db_execute_sql(dbh, "create index calls1 on calls(hostname)", NULL);
02080         switch_cache_db_execute_sql(dbh, "create index chidx1 on channels (hostname)", NULL);
02081         switch_cache_db_execute_sql(dbh, "create index uuindex on channels (uuid)", NULL);
02082         switch_cache_db_execute_sql(dbh, "create index uuindex2 on channels (call_uuid)", NULL);
02083         switch_cache_db_execute_sql(dbh, "create index callsidx1 on calls (hostname)", NULL);
02084         switch_cache_db_execute_sql(dbh, "create index eruuindex on calls (caller_uuid)", NULL);
02085         switch_cache_db_execute_sql(dbh, "create index eeuuindex on calls (callee_uuid)", NULL);
02086         switch_cache_db_execute_sql(dbh, "create index eeuuindex2 on calls (call_uuid)", NULL);
02087         switch_cache_db_execute_sql(dbh, "create index regindex1 on registrations (reg_user,realm,hostname)", NULL);
02088 
02089 
02090  skip:
02091 
02092         if (sql_manager.manage) {
02093                 if (switch_event_bind_removable("core_db", SWITCH_EVENT_ALL, SWITCH_EVENT_SUBCLASS_ANY,
02094                                                                                 core_event_handler, NULL, &sql_manager.event_node) != SWITCH_STATUS_SUCCESS) {
02095                         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind event handler!\n");
02096                 }
02097 
02098                 switch_queue_create(&sql_manager.sql_queue[0], SWITCH_SQL_QUEUE_LEN, sql_manager.memory_pool);
02099                 switch_queue_create(&sql_manager.sql_queue[1], SWITCH_SQL_QUEUE_LEN, sql_manager.memory_pool);
02100         }
02101 
02102         switch_threadattr_create(&thd_attr, sql_manager.memory_pool);
02103         switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
02104         if (sql_manager.manage) {
02105                 switch_thread_create(&sql_manager.thread, thd_attr, switch_core_sql_thread, NULL, sql_manager.memory_pool);
02106         }
02107         switch_thread_create(&sql_manager.db_thread, thd_attr, switch_core_sql_db_thread, NULL, sql_manager.memory_pool);
02108 
02109         while (sql_manager.manage && !sql_manager.thread_running && --sanity) {
02110                 switch_yield(10000);
02111         }
02112 
02113         if (sql_manager.manage) switch_cache_db_release_db_handle(&dbh);
02114 
02115         return SWITCH_STATUS_SUCCESS;
02116 }

void switch_core_sqldb_stop ( void   ) 

Definition at line 2118 of file switch_core_sqldb.c.

References sql_close(), sql_manager, switch_cache_db_flush_handles(), SWITCH_CHANNEL_LOG, switch_event_unbind(), SWITCH_LOG_DEBUG10, switch_log_printf(), switch_queue_push(), switch_thread_join(), and wake_thread().

Referenced by switch_core_destroy().

02119 {
02120         switch_status_t st;
02121 
02122         switch_event_unbind(&sql_manager.event_node);
02123 
02124         if (sql_manager.thread && sql_manager.thread_running) {
02125 
02126                 if (sql_manager.manage) {
02127                         switch_queue_push(sql_manager.sql_queue[0], NULL);
02128                         switch_queue_push(sql_manager.sql_queue[1], NULL);
02129                         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG10, "Waiting for unfinished SQL transactions\n");
02130                         wake_thread(0);
02131                 }
02132 
02133                 sql_manager.thread_running = -1;
02134                 switch_thread_join(&st, sql_manager.thread);
02135         }
02136 
02137 
02138         if (sql_manager.thread && sql_manager.db_thread_running) {
02139                 sql_manager.db_thread_running = -1;
02140                 switch_thread_join(&st, sql_manager.db_thread);
02141         }
02142 
02143         switch_cache_db_flush_handles();
02144         sql_close(0);
02145 }

void switch_core_state_machine_init ( switch_memory_pool_t pool  ) 

Definition at line 287 of file switch_core_state_machine.c.

Referenced by switch_core_init().

00288 {
00289         return;
00290 }


Variable Documentation

struct switch_runtime runtime

Definition at line 58 of file switch_core.c.

Referenced by _switch_cache_db_get_db_handle(), _switch_core_db_handle(), check_ip(), send_heartbeat(), set_auto_priority(), switch_cache_db_persistant_execute_trans(), switch_cache_db_test_reactive(), switch_check_network_list_ip_token(), switch_cond_next(), switch_cond_yield(), switch_core_add_registration(), switch_core_add_state_handler(), switch_core_cpu_count(), switch_core_data_channel(), switch_core_db_test_reactive(), switch_core_debug_level(), switch_core_default_dtmf_duration(), switch_core_del_registration(), switch_core_destroy(), switch_core_dump_variables(), switch_core_expire_registration(), switch_core_flags(), switch_core_get_console(), switch_core_get_hostname(), switch_core_get_state_handler(), switch_core_get_switchname(), switch_core_get_uuid(), switch_core_get_variable(), switch_core_get_variable_dup(), switch_core_get_variable_pdup(), switch_core_idle_cpu(), switch_core_init(), switch_core_init_and_modload(), switch_core_max_dtmf_duration(), switch_core_mime_add_type(), switch_core_mime_ext2type(), switch_core_mime_index(), switch_core_min_dtmf_duration(), switch_core_min_idle_cpu(), switch_core_ready(), switch_core_ready_inbound(), switch_core_ready_outbound(), switch_core_remove_state_handler(), switch_core_runtime_loop(), switch_core_session_ctl(), switch_core_session_event_send(), switch_core_session_force_locate(), switch_core_session_hangup_state(), switch_core_session_hupall(), switch_core_session_hupall_endpoint(), switch_core_session_hupall_matching_var(), switch_core_session_locate(), switch_core_session_message_send(), switch_core_session_perform_destroy(), switch_core_session_read_frame(), switch_core_session_request_uuid(), switch_core_session_set_uuid(), switch_core_session_sync_clock(), switch_core_sessions_per_second(), switch_core_set_console(), switch_core_set_signal_handlers(), switch_core_set_var_conditional(), switch_core_set_variable(), switch_core_sql_db_thread(), switch_core_sql_thread(), switch_core_sqldb_start(), switch_core_unset_variables(), switch_core_uptime(), switch_default_ptime(), switch_load_core_config(), switch_load_network_lists(), switch_log_vprintf(), switch_micro_time_now(), SWITCH_MODULE_LOAD_FUNCTION(), SWITCH_MODULE_RUNTIME_FUNCTION(), switch_simple_email(), switch_sql_concat(), switch_system(), switch_time_calibrate_clock(), switch_time_sync(), switch_uuid_get(), timer_destroy(), timer_init(), and timer_next().

struct switch_session_manager session_manager

Definition at line 40 of file switch_core_session.c.

Referenced by switch_core_session_count(), switch_core_session_event_send(), switch_core_session_force_locate(), switch_core_session_hupall(), switch_core_session_hupall_endpoint(), switch_core_session_hupall_matching_var(), switch_core_session_id(), switch_core_session_init(), switch_core_session_limit(), switch_core_session_locate(), switch_core_session_message_send(), switch_core_session_perform_destroy(), switch_core_session_request_uuid(), switch_core_session_set_uuid(), switch_core_session_sync_clock(), and switch_core_session_uninit().


Generated on Sun May 20 04:00:09 2012 for FreeSWITCH API Documentation by  doxygen 1.4.7