| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
SQLite 3 configuration engine. More...
#include "asterisk.h"#include <sqlite3.h>#include "asterisk/module.h"#include "asterisk/config.h"#include "asterisk/paths.h"#include "asterisk/astobj2.h"#include "asterisk/lock.h"#include "asterisk/utils.h"#include "asterisk/app.h"
Go to the source code of this file.
| Data Structures | |
| struct | cfg_entry_args | 
| struct | realtime_sqlite3_db | 
| struct | row_counter_args | 
| Macros | |
| #define | DB_BUCKETS 7 | 
| #define | IS_SQL_LIKE_CLAUSE(x) ((x) && ast_ends_with(x, " LIKE")) | 
| Typedefs | |
| typedef int(* | callback_t) (void *, int, char **, char **) | 
| Enumerations | |
| enum | { REALTIME_SQLITE3_REQ_WARN , REALTIME_SQLITE3_REQ_CLOSE , REALTIME_SQLITE3_REQ_CHAR } | 
| enum | { COL_CATEGORY , COL_VAR_NAME , COL_VAR_VAL , COL_COLUMNS } | 
| Functions | |
| static void | __reg_module (void) | 
| static void | __unreg_module (void) | 
| static int | add_column_name (void *arg, int num_columns, char **values, char **columns) | 
| Callback for creating a hash of column names for comparison in realtime_sqlite3_require. | |
| static int | append_row_to_cfg (void *arg, int num_columns, char **values, char **columns) | 
| Callback for creating an ast_config from a successive sqlite3 result rows. | |
| struct ast_module * | AST_MODULE_SELF_SYM (void) | 
| AST_THREADSTORAGE_CUSTOM_SCOPE (escape_column_buf, NULL, ast_free_ptr, static) | |
| AST_THREADSTORAGE_CUSTOM_SCOPE (escape_table_buf, NULL, ast_free_ptr, static) | |
| AST_THREADSTORAGE_CUSTOM_SCOPE (escape_value_buf, NULL, ast_free_ptr, static) | |
| static int | db_cmp_fn (void *obj, void *arg, int flags) | 
| static void | db_destructor (void *obj) | 
| static int | db_hash_fn (const void *obj, const int flags) | 
| static int | db_open (struct realtime_sqlite3_db *db) | 
| Open a database and appropriately set debugging on the db handle. | |
| void | db_start_batch (struct realtime_sqlite3_db *db) | 
| void | db_stop_batch (struct realtime_sqlite3_db *db) | 
| static void | db_sync (struct realtime_sqlite3_db *db) | 
| static void * | db_sync_thread (void *data) | 
| Wrap commands in transactions increased write performance. | |
| static void | discover_sqlite3_caps (void) | 
| static struct realtime_sqlite3_db * | find_database (const char *database) | 
| static const char * | get_sqlite_column_type (int type) | 
| Convert Asterisk realtime types to SQLite 3 types. | |
| static int | handle_missing_column (struct realtime_sqlite3_db *db, const char *table, const char *column, int type, size_t sz) | 
| If ast_realtime_require sends info about a column we don't have, create it. | |
| static int | handle_missing_table (struct realtime_sqlite3_db *db, const char *table, va_list ap) | 
| Create a table if ast_realtime_require shows that we are configured to handle the data. | |
| static int | is_dirty_cb (void *obj, void *arg, int flags) | 
| static int | load_module (void) | 
| Load the module. | |
| static void | mark_all_databases_dirty (void) | 
| static int | mark_dirty_cb (void *obj, void *arg, int flags) | 
| static struct realtime_sqlite3_db * | new_realtime_sqlite3_db (struct ast_config *config, const char *cat) | 
| Create a db object based on a config category. | |
| static int | parse_config (int reload) | 
| Parse the res_config_sqlite3 config file. | |
| static struct ast_variable * | realtime_sqlite3 (const char *database, const char *table, const struct ast_variable *fields) | 
| Realtime callback for a single row query. | |
| static int | realtime_sqlite3_destroy (const char *database, const char *table, const char *keyfield, const char *entity, const struct ast_variable *fields) | 
| Realtime callback for deleting a row. | |
| static int | realtime_sqlite3_exec_query (const char *, const char *, callback_t, void *) | 
| static int | realtime_sqlite3_exec_query_with_handle (struct realtime_sqlite3_db *, const char *, callback_t, void *) | 
| static int | realtime_sqlite3_exec_update (const char *, const char *) | 
| static int | realtime_sqlite3_exec_update_with_handle (struct realtime_sqlite3_db *, const char *) | 
| static int | realtime_sqlite3_helper (const char *database, const char *table, const struct ast_variable *fields, int is_multi, void *arg) | 
| Helper function for single and multi-row realtime load functions. | |
| static struct ast_config * | realtime_sqlite3_load (const char *database, const char *table, const char *configfile, struct ast_config *config, struct ast_flags flags, const char *suggested_include_file, const char *who_asked) | 
| Realtime callback for static realtime. | |
| static struct ast_config * | realtime_sqlite3_multi (const char *database, const char *table, const struct ast_variable *fields) | 
| Realtime callback for a multi-row query. | |
| static int | realtime_sqlite3_require (const char *database, const char *table, va_list ap) | 
| Callback for ast_realtime_require. | |
| static int | realtime_sqlite3_store (const char *database, const char *table, const struct ast_variable *fields) | 
| Realtime callback for inserting a row. | |
| static int | realtime_sqlite3_unload (const char *database, const char *table) | 
| Callback for clearing any cached info. | |
| static int | realtime_sqlite3_update (const char *database, const char *table, const char *keyfield, const char *entity, const struct ast_variable *fields) | 
| Realtime callback for updating a row based on a single criteria. | |
| static int | realtime_sqlite3_update2 (const char *database, const char *table, const struct ast_variable *lookup_fields, const struct ast_variable *update_fields) | 
| Realtime callback for updating a row based on multiple criteria. | |
| static int | reload (void) | 
| static int | row_counter_wrapper (void *arg, int num_columns, char **values, char **columns) | 
| static int | row_to_varlist (void *arg, int num_columns, char **values, char **columns) | 
| Create a varlist from a single sqlite3 result row. | |
| static const char * | sqlite3_escape_column (const char *param) | 
| static const char * | sqlite3_escape_column_op (const char *param) | 
| static const char * | sqlite3_escape_string_helper (struct ast_threadstorage *ts, const char *param) | 
| static const char * | sqlite3_escape_table (const char *param) | 
| static const char * | sqlite3_escape_value (const char *param) | 
| static int | static_realtime_cb (void *arg, int num_columns, char **values, char **columns) | 
| static int | stop_batch_cb (void *obj, void *arg, int flags) | 
| static int | str_cmp_fn (void *obj, void *arg, int flags) | 
| static int | str_hash_fn (const void *obj, const int flags) | 
| static int | str_to_requirements (const char *data) | 
| static void | trace_cb (void *arg, const char *sql) | 
| static void | unlink_dirty_databases (void) | 
| static int | unload_module (void) | 
| static void | unref_db (struct realtime_sqlite3_db **db) | 
| static int | update_realtime_sqlite3_db (struct realtime_sqlite3_db *db, struct ast_config *config, const char *cat) | 
| Update an existing db object based on config data. | |
| Variables | |
| static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "SQLite 3 realtime config engine" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_REALTIME_DRIVER, .requires = "extconfig", } | 
| static const struct ast_module_info * | ast_module_info = &__mod_info | 
| static ast_mutex_t | config_lock = AST_MUTEX_INIT_VALUE | 
| struct ao2_container * | databases | 
| static int | has_explicit_like_escaping | 
| struct ast_config_engine | sqlite3_config_engine | 
| static const char * | static_sql = "SELECT category, var_name, var_val FROM \"%q\" WHERE filename = %Q AND commented = 0 ORDER BY cat_metric ASC, var_metric ASC" | 
SQLite 3 configuration engine.
This is a realtime configuration engine for the SQLite 3 Database
Definition in file res_config_sqlite3.c.
| #define DB_BUCKETS 7 | 
Definition at line 108 of file res_config_sqlite3.c.
| #define IS_SQL_LIKE_CLAUSE | ( | x | ) | ((x) && ast_ends_with(x, " LIKE")) | 
Definition at line 793 of file res_config_sqlite3.c.
| typedef int(* callback_t) (void *, int, char **, char **) | 
Definition at line 117 of file res_config_sqlite3.c.
| anonymous enum | 
| Enumerator | |
|---|---|
| REALTIME_SQLITE3_REQ_WARN | |
| REALTIME_SQLITE3_REQ_CLOSE | |
| REALTIME_SQLITE3_REQ_CHAR | |
Definition at line 83 of file res_config_sqlite3.c.
| anonymous enum | 
| Enumerator | |
|---|---|
| COL_CATEGORY | |
| COL_VAR_NAME | |
| COL_VAR_VAL | |
| COL_COLUMNS | |
Definition at line 710 of file res_config_sqlite3.c.
| 
 | static | 
Definition at line 1400 of file res_config_sqlite3.c.
| 
 | static | 
Definition at line 1400 of file res_config_sqlite3.c.
| 
 | static | 
Callback for creating a hash of column names for comparison in realtime_sqlite3_require.
Definition at line 1149 of file res_config_sqlite3.c.
References ao2_alloc, ao2_link, ao2_ref, and NULL.
Referenced by realtime_sqlite3_require().
| 
 | static | 
Callback for creating an ast_config from a successive sqlite3 result rows.
Definition at line 510 of file res_config_sqlite3.c.
References ast_category_append(), ast_category_new_anonymous, ast_log, ast_variable_append(), ast_variable_new, LOG_ERROR, S_OR, and var.
Referenced by realtime_sqlite3_helper().
| struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) | 
Definition at line 1400 of file res_config_sqlite3.c.
| AST_THREADSTORAGE_CUSTOM_SCOPE | ( | escape_column_buf | , | 
| NULL | , | ||
| ast_free_ptr | , | ||
| static | |||
| ) | 
| AST_THREADSTORAGE_CUSTOM_SCOPE | ( | escape_table_buf | , | 
| NULL | , | ||
| ast_free_ptr | , | ||
| static | |||
| ) | 
| AST_THREADSTORAGE_CUSTOM_SCOPE | ( | escape_value_buf | , | 
| NULL | , | ||
| ast_free_ptr | , | ||
| static | |||
| ) | 
| 
 | static | 
Definition at line 221 of file res_config_sqlite3.c.
References CMP_MATCH, CMP_STOP, db, name, and OBJ_KEY.
Referenced by load_module().
| 
 | static | 
Definition at line 228 of file res_config_sqlite3.c.
References ao2_lock, ao2_unlock, ast_debug, ast_string_field_free_memory, db, and db_stop_batch().
Referenced by new_realtime_sqlite3_db().
| 
 | static | 
Definition at line 214 of file res_config_sqlite3.c.
References ast_str_hash(), db, and OBJ_KEY.
Referenced by load_module().
| 
 | static | 
Open a database and appropriately set debugging on the db handle.
Definition at line 336 of file res_config_sqlite3.c.
References ao2_lock, ao2_unlock, ast_log, db, LOG_WARNING, NULL, and trace_cb().
| void db_start_batch | ( | struct realtime_sqlite3_db * | db | ) | 
Definition at line 363 of file res_config_sqlite3.c.
References ao2_ref, ast_cond_init, ast_pthread_create_background, db, db_sync_thread(), and NULL.
Referenced by parse_config(), and update_realtime_sqlite3_db().
| void db_stop_batch | ( | struct realtime_sqlite3_db * | db | ) | 
Definition at line 372 of file res_config_sqlite3.c.
References db, db_sync(), and NULL.
Referenced by db_destructor(), is_dirty_cb(), stop_batch_cb(), and update_realtime_sqlite3_db().
| 
 | static | 
Definition at line 357 of file res_config_sqlite3.c.
References ast_cond_signal, and db.
| 
 | static | 
Wrap commands in transactions increased write performance.
Definition at line 307 of file res_config_sqlite3.c.
References ao2_lock, ao2_object_get_lockaddr(), ao2_unlock, ast_cond_wait, db, NULL, realtime_sqlite3_exec_query_with_handle(), and unref_db().
Referenced by db_start_batch().
| 
 | static | 
Definition at line 1336 of file res_config_sqlite3.c.
References ast_debug, and has_explicit_like_escaping.
Referenced by load_module().
| 
 | static | 
Definition at line 242 of file res_config_sqlite3.c.
References ao2_find, and OBJ_KEY.
Referenced by parse_config(), realtime_sqlite3_exec_query(), realtime_sqlite3_exec_update(), and realtime_sqlite3_require().
| 
 | static | 
Convert Asterisk realtime types to SQLite 3 types.
Definition at line 1050 of file res_config_sqlite3.c.
References RQ_CHAR, RQ_DATE, RQ_DATETIME, RQ_FLOAT, RQ_INTEGER1, RQ_INTEGER2, RQ_INTEGER3, RQ_INTEGER4, RQ_INTEGER8, RQ_UINTEGER1, RQ_UINTEGER2, RQ_UINTEGER3, RQ_UINTEGER4, RQ_UINTEGER8, and type.
Referenced by handle_missing_column(), and handle_missing_table().
| 
 | static | 
If ast_realtime_require sends info about a column we don't have, create it.
Definition at line 1112 of file res_config_sqlite3.c.
References ast_log, db, get_sqlite_column_type(), LOG_NOTICE, LOG_WARNING, realtime_sqlite3_exec_update_with_handle(), REALTIME_SQLITE3_REQ_CHAR, REALTIME_SQLITE3_REQ_WARN, and type.
Referenced by realtime_sqlite3_require().
| 
 | static | 
Create a table if ast_realtime_require shows that we are configured to handle the data.
Definition at line 1079 of file res_config_sqlite3.c.
References ast_free, ast_str_append(), ast_str_buffer(), ast_str_create, ast_str_set(), db, first, get_sqlite_column_type(), realtime_sqlite3_exec_update_with_handle(), sqlite3_escape_column(), sqlite3_escape_table(), type, and typeof().
Referenced by realtime_sqlite3_require().
| 
 | static | 
Definition at line 273 of file res_config_sqlite3.c.
References CMP_MATCH, db, and db_stop_batch().
Referenced by unlink_dirty_databases().
| 
 | static | 
Load the module.
Module loading including tests for configuration or dependencies. This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE, or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails tests return AST_MODULE_LOAD_FAILURE. If the module can not load the configuration file or other non-critical problem return AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
Definition at line 1369 of file res_config_sqlite3.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, ao2_ref, ast_config_engine_register(), ast_log, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, DB_BUCKETS, db_cmp_fn(), db_hash_fn(), discover_sqlite3_caps(), LOG_ERROR, NULL, parse_config(), and sqlite3_config_engine.
| 
 | static | 
Definition at line 268 of file res_config_sqlite3.c.
References ao2_callback, mark_dirty_cb(), NULL, OBJ_MULTIPLE, and OBJ_NODATA.
Referenced by parse_config().
| 
 | static | 
Definition at line 261 of file res_config_sqlite3.c.
References CMP_MATCH, db, and realtime_sqlite3_db::dirty.
Referenced by mark_all_databases_dirty().
| 
 | static | 
Create a db object based on a config category.
Definition at line 385 of file res_config_sqlite3.c.
References ao2_alloc, ast_app_parse_timelen(), ast_log, ast_parse_arg(), ast_string_field_init, ast_string_field_set, ast_strlen_zero(), ast_true(), ast_variable_browse(), config, db, db_destructor(), realtime_sqlite3_db::filename, LOG_WARNING, name, ast_variable::next, NULL, PARSE_DEFAULT, PARSE_INT32, REALTIME_SQLITE3_REQ_WARN, str_to_requirements(), TIMELEN_MILLISECONDS, unref_db(), and var.
Referenced by parse_config(), and update_realtime_sqlite3_db().
| 
 | static | 
Parse the res_config_sqlite3 config file.
Definition at line 1259 of file res_config_sqlite3.c.
References ao2_link, ast_category_browse(), ast_config_destroy(), ast_config_load, ast_debug, ast_log, ast_mutex_lock, ast_mutex_unlock, config, config_filename, CONFIG_FLAG_FILEUNCHANGED, CONFIG_FLAG_NOREALTIME, config_lock, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEMISSING, CONFIG_STATUS_FILEUNCHANGED, db, db_open(), db_start_batch(), find_database(), LOG_ERROR, LOG_WARNING, mark_all_databases_dirty(), new_realtime_sqlite3_db(), NULL, reload(), unlink_dirty_databases(), unref_db(), and update_realtime_sqlite3_db().
| 
 | static | 
Realtime callback for a single row query.
Definition at line 848 of file res_config_sqlite3.c.
References NULL, and realtime_sqlite3_helper().
| 
 | static | 
Realtime callback for deleting a row.
Definition at line 1012 of file res_config_sqlite3.c.
References ast_free, ast_log, ast_str_append(), ast_str_buffer(), ast_str_create, ast_str_set(), ast_strlen_zero(), first, LOG_WARNING, ast_variable::name, ast_variable::next, realtime_sqlite3_exec_update(), sqlite3_escape_column_op(), sqlite3_escape_table(), sqlite3_escape_value(), and ast_variable::value.
| 
 | static | 
Definition at line 630 of file res_config_sqlite3.c.
References ao2_ref, ast_log, callback(), db, find_database(), LOG_WARNING, and realtime_sqlite3_exec_query_with_handle().
Referenced by realtime_sqlite3_helper(), and realtime_sqlite3_load().
| 
 | static | 
Definition at line 596 of file res_config_sqlite3.c.
References ao2_lock, ao2_unlock, ast_log, callback(), db, LOG_WARNING, row_counter_args::row_count, row_counter_wrapper(), and row_counter_args::wrapped_callback.
Referenced by db_sync_thread(), realtime_sqlite3_exec_query(), and realtime_sqlite3_require().
| 
 | static | 
Definition at line 692 of file res_config_sqlite3.c.
References ao2_ref, ast_log, db, find_database(), LOG_WARNING, and realtime_sqlite3_exec_update_with_handle().
Referenced by realtime_sqlite3_destroy(), realtime_sqlite3_store(), realtime_sqlite3_update(), and realtime_sqlite3_update2().
| 
 | static | 
Definition at line 659 of file res_config_sqlite3.c.
References ao2_lock, ao2_unlock, ast_log, db, db_sync(), LOG_WARNING, and NULL.
Referenced by handle_missing_column(), handle_missing_table(), and realtime_sqlite3_exec_update().
| 
 | static | 
Helper function for single and multi-row realtime load functions.
Definition at line 796 of file res_config_sqlite3.c.
References append_row_to_cfg(), ast_free, ast_log, ast_str_append(), ast_str_buffer(), ast_str_create, ast_str_set(), ast_strlen_zero(), first, has_explicit_like_escaping, IS_SQL_LIKE_CLAUSE, LOG_WARNING, ast_variable::name, ast_variable::next, realtime_sqlite3_exec_query(), row_to_varlist(), sqlite3_escape_column_op(), sqlite3_escape_table(), sqlite3_escape_value(), and ast_variable::value.
Referenced by realtime_sqlite3(), and realtime_sqlite3_multi().
| 
 | static | 
Realtime callback for static realtime.
Definition at line 765 of file res_config_sqlite3.c.
References args, ast_log, ast_strlen_zero(), config, cfg_entry_args::flags, LOG_WARNING, NULL, realtime_sqlite3_exec_query(), static_realtime_cb(), static_sql, and cfg_entry_args::who_asked.
| 
 | static | 
Realtime callback for a multi-row query.
Definition at line 860 of file res_config_sqlite3.c.
References ast_config_destroy(), ast_config_new(), NULL, and realtime_sqlite3_helper().
| 
 | static | 
Callback for ast_realtime_require.
| 0 | Required fields met specified standards | 
| -1 | One or more fields was missing or insufficient | 
Definition at line 1171 of file res_config_sqlite3.c.
References add_column_name(), AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, ao2_find, ao2_ref, ast_log, ast_strlen_zero(), db, find_database(), handle_missing_column(), handle_missing_table(), LOG_WARNING, NULL, OBJ_POINTER, OBJ_UNLINK, realtime_sqlite3_exec_query_with_handle(), str_cmp_fn(), str_hash_fn(), type, typeof(), and unref_db().
| 
 | static | 
Realtime callback for inserting a row.
Definition at line 968 of file res_config_sqlite3.c.
References ast_free, ast_log, ast_str_append(), ast_str_buffer(), ast_str_create, ast_str_set(), ast_strlen_zero(), first, LOG_WARNING, ast_variable::name, ast_variable::next, realtime_sqlite3_exec_update(), sqlite3_escape_column(), sqlite3_escape_table(), sqlite3_escape_value(), and ast_variable::value.
| 
 | static | 
Callback for clearing any cached info.
| 0 | If any cache was purged | 
| -1 | If no cache was found | 
Definition at line 1251 of file res_config_sqlite3.c.
| 
 | static | 
Realtime callback for updating a row based on a single criteria.
Definition at line 879 of file res_config_sqlite3.c.
References ast_free, ast_log, ast_str_append(), ast_str_buffer(), ast_str_create, ast_str_set(), ast_strlen_zero(), first, LOG_WARNING, ast_variable::name, ast_variable::next, realtime_sqlite3_exec_update(), sqlite3_escape_column(), sqlite3_escape_column_op(), sqlite3_escape_table(), sqlite3_escape_value(), and ast_variable::value.
| 
 | static | 
Realtime callback for updating a row based on multiple criteria.
Definition at line 915 of file res_config_sqlite3.c.
References ast_free, ast_log, ast_str_append(), ast_str_buffer(), ast_str_create, ast_str_set(), ast_strlen_zero(), first, LOG_WARNING, ast_variable::name, ast_variable::next, realtime_sqlite3_exec_update(), sqlite3_escape_column(), sqlite3_escape_column_op(), sqlite3_escape_table(), sqlite3_escape_value(), and ast_variable::value.
| 
 | static | 
Definition at line 1318 of file res_config_sqlite3.c.
References parse_config().
Referenced by parse_config().
| 
 | static | 
Definition at line 573 of file res_config_sqlite3.c.
References row_counter_args::row_count, row_counter_args::wrapped_arg, and row_counter_args::wrapped_callback.
Referenced by realtime_sqlite3_exec_query_with_handle().
| 
 | static | 
Create a varlist from a single sqlite3 result row.
Definition at line 485 of file res_config_sqlite3.c.
References ast_variable_new, ast_variables_destroy(), ast_variable::next, NULL, and S_OR.
Referenced by realtime_sqlite3_helper().
| 
 | inlinestatic | 
Definition at line 164 of file res_config_sqlite3.c.
References sqlite3_escape_string_helper().
Referenced by handle_missing_table(), realtime_sqlite3_store(), realtime_sqlite3_update(), and realtime_sqlite3_update2().
| 
 | static | 
Definition at line 170 of file res_config_sqlite3.c.
References ast_str_buffer(), ast_str_make_space, ast_str_reset(), ast_str_size(), ast_str_thread_get(), ast_str_update(), and buf.
Referenced by realtime_sqlite3_destroy(), realtime_sqlite3_helper(), realtime_sqlite3_update(), and realtime_sqlite3_update2().
| 
 | inlinestatic | 
Definition at line 127 of file res_config_sqlite3.c.
References ast_str_buffer(), ast_str_make_space, ast_str_reset(), ast_str_size(), ast_str_thread_get(), ast_str_update(), and buf.
Referenced by sqlite3_escape_column(), sqlite3_escape_table(), and sqlite3_escape_value().
| 
 | inlinestatic | 
Definition at line 159 of file res_config_sqlite3.c.
References sqlite3_escape_string_helper().
Referenced by handle_missing_table(), realtime_sqlite3_destroy(), realtime_sqlite3_helper(), realtime_sqlite3_store(), realtime_sqlite3_update(), and realtime_sqlite3_update2().
| 
 | inlinestatic | 
Definition at line 209 of file res_config_sqlite3.c.
References sqlite3_escape_string_helper().
Referenced by realtime_sqlite3_destroy(), realtime_sqlite3_helper(), realtime_sqlite3_store(), realtime_sqlite3_update(), and realtime_sqlite3_update2().
| 
 | static | 
Definition at line 717 of file res_config_sqlite3.c.
References args, ast_category_append(), ast_category_destroy(), ast_category_new_dynamic, ast_config_internal_load(), ast_free, ast_log, ast_strdup, ast_variable_append(), ast_variable_new, COL_CATEGORY, COL_VAR_NAME, COL_VAR_VAL, LOG_WARNING, and var.
Referenced by realtime_sqlite3_load().
| 
 | static | 
Definition at line 253 of file res_config_sqlite3.c.
References CMP_MATCH, db, and db_stop_batch().
Referenced by unload_module().
| 
 | static | 
Definition at line 1143 of file res_config_sqlite3.c.
Referenced by realtime_sqlite3_require().
| 
 | static | 
Definition at line 1138 of file res_config_sqlite3.c.
References ast_str_hash().
Referenced by realtime_sqlite3_require().
| 
 | static | 
Definition at line 288 of file res_config_sqlite3.c.
References REALTIME_SQLITE3_REQ_CHAR, REALTIME_SQLITE3_REQ_CLOSE, and REALTIME_SQLITE3_REQ_WARN.
Referenced by new_realtime_sqlite3_db().
| 
 | static | 
Definition at line 300 of file res_config_sqlite3.c.
Referenced by db_open(), and update_realtime_sqlite3_db().
| 
 | static | 
Definition at line 283 of file res_config_sqlite3.c.
References ao2_callback, is_dirty_cb(), NULL, OBJ_MULTIPLE, OBJ_NODATA, and OBJ_UNLINK.
Referenced by parse_config().
| 
 | static | 
Definition at line 1324 of file res_config_sqlite3.c.
References ao2_callback, ao2_ref, ast_config_engine_deregister(), ast_mutex_lock, ast_mutex_unlock, config_lock, NULL, OBJ_MULTIPLE, OBJ_NODATA, OBJ_UNLINK, sqlite3_config_engine, and stop_batch_cb().
| 
 | static | 
Definition at line 247 of file res_config_sqlite3.c.
References ao2_ref, db, and NULL.
Referenced by db_sync_thread(), new_realtime_sqlite3_db(), parse_config(), realtime_sqlite3_require(), and update_realtime_sqlite3_db().
| 
 | static | 
Update an existing db object based on config data.
| db | The database object to update | 
| config | The configuration data with which to update the db | 
| cat | The config category (which becomes db->name) | 
Definition at line 435 of file res_config_sqlite3.c.
References ast_string_field_set, config, db, db_open(), db_start_batch(), db_stop_batch(), realtime_sqlite3_db::filename, new_realtime_sqlite3_db(), NULL, realtime_sqlite3_db::requirements, trace_cb(), and unref_db().
Referenced by parse_config().
| 
 | static | 
Definition at line 1400 of file res_config_sqlite3.c.
| 
 | static | 
Definition at line 1400 of file res_config_sqlite3.c.
| 
 | static | 
Definition at line 110 of file res_config_sqlite3.c.
Referenced by parse_config(), and unload_module().
| struct ao2_container* databases | 
Definition at line 107 of file res_config_sqlite3.c.
| 
 | static | 
Definition at line 58 of file res_config_sqlite3.c.
Referenced by discover_sqlite3_caps(), and realtime_sqlite3_helper().
| struct ast_config_engine sqlite3_config_engine | 
Definition at line 70 of file res_config_sqlite3.c.
Referenced by load_module(), and unload_module().
| 
 | static | 
Definition at line 709 of file res_config_sqlite3.c.
Referenced by realtime_sqlite3_load().