mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
move recovery engine up into the core
This commit is contained in:
@@ -250,6 +250,11 @@ struct switch_runtime {
|
||||
char *odbc_user;
|
||||
char *odbc_pass;
|
||||
char *dbname;
|
||||
char *recovery_odbc_dsn;
|
||||
char *recovery_odbc_user;
|
||||
char *recovery_odbc_pass;
|
||||
char *recovery_dbname;
|
||||
switch_dbtype_t recovery_odbc_dbtype;
|
||||
uint32_t debug_level;
|
||||
uint32_t runlevel;
|
||||
uint32_t tipping_point;
|
||||
|
||||
@@ -2288,6 +2288,8 @@ SWITCH_DECLARE(int) switch_cache_db_affected_rows(switch_cache_db_handle_t *dbh)
|
||||
SWITCH_DECLARE(void) switch_cache_db_status(switch_stream_handle_t *stream);
|
||||
SWITCH_DECLARE(switch_status_t) _switch_core_db_handle(switch_cache_db_handle_t ** dbh, const char *file, const char *func, int line);
|
||||
#define switch_core_db_handle(_a) _switch_core_db_handle(_a, __FILE__, __SWITCH_FUNC__, __LINE__)
|
||||
SWITCH_DECLARE(switch_status_t) _switch_core_recovery_db_handle(switch_cache_db_handle_t ** dbh, const char *file, const char *func, int line);
|
||||
#define switch_core_recovery_db_handle(_a) _switch_core_recovery_db_handle(_a, __FILE__, __SWITCH_FUNC__, __LINE__)
|
||||
|
||||
SWITCH_DECLARE(switch_bool_t) switch_cache_db_test_reactive(switch_cache_db_handle_t *db,
|
||||
const char *test_sql, const char *drop_sql, const char *reactive_sql);
|
||||
@@ -2344,6 +2346,13 @@ SWITCH_DECLARE(void) switch_close_extra_files(int *keep, int keep_ttl);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_thread_set_cpu_affinity(int cpu);
|
||||
SWITCH_DECLARE(void) switch_os_yield(void);
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_get_stacksizes(switch_size_t *cur, switch_size_t *max);
|
||||
|
||||
|
||||
SWITCH_DECLARE(int) switch_core_recovery_recover(const char *technology, const char *profile_name);
|
||||
SWITCH_DECLARE(void) switch_core_recovery_untrack(switch_core_session_t *session, switch_bool_t force);
|
||||
SWITCH_DECLARE(void) switch_core_recovery_track(switch_core_session_t *session);
|
||||
SWITCH_DECLARE(void) switch_core_recovery_flush(const char *technology, const char *profile_name);
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
#endif
|
||||
/* For Emacs:
|
||||
|
||||
@@ -184,8 +184,12 @@ struct switch_endpoint_interface {
|
||||
|
||||
/* parent */
|
||||
switch_loadable_module_interface_t *parent;
|
||||
|
||||
/* to facilitate linking */
|
||||
struct switch_endpoint_interface *next;
|
||||
|
||||
switch_core_recover_callback_t recover_callback;
|
||||
|
||||
};
|
||||
|
||||
/*! \brief Abstract handler to a timer module */
|
||||
|
||||
@@ -1237,6 +1237,10 @@ typedef enum {
|
||||
CF_CONFIRM_BLIND_TRANSFER,
|
||||
CF_NO_PRESENCE,
|
||||
CF_CONFERENCE,
|
||||
CF_RECOVERING,
|
||||
CF_RECOVERING_BRIDGE,
|
||||
CF_TRACKED,
|
||||
CF_TRACKABLE,
|
||||
/* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
|
||||
/* IF YOU ADD NEW ONES CHECK IF THEY SHOULD PERSIST OR ZERO THEM IN switch_core_session.c switch_core_session_request_xml() */
|
||||
CF_FLAG_MAX
|
||||
@@ -1778,7 +1782,8 @@ typedef enum {
|
||||
SCSC_SYNC_CLOCK_WHEN_IDLE,
|
||||
SCSC_DEBUG_SQL,
|
||||
SCSC_SQL,
|
||||
SCSC_API_EXPANSION
|
||||
SCSC_API_EXPANSION,
|
||||
SCSC_RECOVER
|
||||
} switch_session_ctl_t;
|
||||
|
||||
typedef enum {
|
||||
@@ -1891,6 +1896,7 @@ typedef switch_status_t (*switch_chat_application_function_t) (switch_event_t *,
|
||||
typedef void (*switch_application_function_t) (switch_core_session_t *, const char *);
|
||||
#define SWITCH_STANDARD_APP(name) static void name (switch_core_session_t *session, const char *data)
|
||||
|
||||
typedef int (*switch_core_recover_callback_t)(switch_core_session_t *session);
|
||||
typedef void (*switch_event_callback_t) (switch_event_t *);
|
||||
typedef switch_caller_extension_t *(*switch_dialplan_hunt_function_t) (switch_core_session_t *, void *, switch_caller_profile_t *);
|
||||
#define SWITCH_STANDARD_DIALPLAN(name) static switch_caller_extension_t *name (switch_core_session_t *session, void *arg, switch_caller_profile_t *caller_profile)
|
||||
|
||||
Reference in New Issue
Block a user