Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Configuration File Parser. More...
#include "asterisk.h"
#include "asterisk/paths.h"
#include "asterisk/network.h"
#include <string.h>
#include <libgen.h>
#include <time.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <math.h>
#include <regex.h>
#include "asterisk/config.h"
#include "asterisk/cli.h"
#include "asterisk/lock.h"
#include "asterisk/utils.h"
#include "asterisk/channel.h"
#include "asterisk/app.h"
#include "asterisk/astobj2.h"
#include "asterisk/strings.h"
#include "asterisk/netsock2.h"
#include "asterisk/module.h"
Go to the source code of this file.
Data Structures | |
struct | ast_category |
struct | ast_category_template_instance |
struct | ast_comment |
Structure to keep comments for rewriting configuration files. More... | |
struct | ast_config |
struct | ast_config_include |
struct | ast_config_map |
struct | cache_file_include |
Hold the mtime for config files, so if we don't need to reread our config, don't. More... | |
struct | cache_file_mtime |
struct | cfg_hook |
struct | cfmtime_head |
struct | inclfile |
struct | cache_file_mtime::includes |
struct | ast_category::template_instance_list |
Macros | |
#define | AST_MODULE "extconfig" |
#define | CB_SIZE 250 /* initial size of comment buffers */ |
#define | COMMENT_END "--;" |
#define | COMMENT_META ';' |
#define | COMMENT_START ";--" |
#define | COMMENT_TAG '-' |
#define | MAX_INCLUDE_LEVEL 10 |
#define | MAX_NESTED_COMMENTS 128 |
#define | MIN_VARIABLE_FNAME_SPACE 40 |
#define | realtime_arguments_to_fields(ap, result) realtime_arguments_to_fields2(ap, 0, result) |
#define | UTF8_BOM "\xEF\xBB\xBF" |
Enumerations | |
enum | config_cache_attribute_enum { ATTRIBUTE_INCLUDE = 0 , ATTRIBUTE_EXEC = 1 } |
Functions | |
static void | __init_appendbuf (void) |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_variable * | _ast_variable_new (const char *name, const char *value, const char *filename, const char *file, const char *func, int lineno) |
static struct ast_comment * | ALLOC_COMMENT (struct ast_str *buffer) |
void | ast_category_append (struct ast_config *config, struct ast_category *category) |
Appends a category to a config. More... | |
char * | ast_category_browse (struct ast_config *config, const char *prev_name) |
Browse categories. More... | |
struct ast_category * | ast_category_browse_filtered (struct ast_config *config, const char *category_name, struct ast_category *prev, const char *filter) |
Browse categories with filters. More... | |
struct ast_category * | ast_category_delete (struct ast_config *config, struct ast_category *category) |
Delete a category. More... | |
void | ast_category_destroy (struct ast_category *cat) |
struct ast_variable * | ast_category_detach_variables (struct ast_category *cat) |
int | ast_category_empty (struct ast_category *category) |
Removes and destroys all variables in a category. More... | |
int | ast_category_exist (const struct ast_config *config, const char *category_name, const char *filter) |
Check for category duplicates. More... | |
struct ast_variable * | ast_category_first (struct ast_category *cat) |
given a pointer to a category, return the root variable. More... | |
struct ast_category * | ast_category_get (const struct ast_config *config, const char *category_name, const char *filter) |
Retrieve a category if it exists. More... | |
const char * | ast_category_get_name (const struct ast_category *category) |
Return the name of the category. More... | |
struct ast_str * | ast_category_get_templates (const struct ast_category *category) |
Return the template names this category inherits from. More... | |
int | ast_category_inherit (struct ast_category *new, const struct ast_category *base) |
Applies base (template) to category. More... | |
int | ast_category_insert (struct ast_config *config, struct ast_category *cat, const char *match) |
Inserts new category. More... | |
int | ast_category_is_template (const struct ast_category *category) |
Check if category is a template. More... | |
struct ast_category * | ast_category_new (const char *name, const char *in_file, int lineno) |
Create a category. More... | |
struct ast_category * | ast_category_new_template (const char *name, const char *in_file, int lineno) |
Create a category making it a template. More... | |
void | ast_category_rename (struct ast_category *cat, const char *name) |
struct ast_variable * | ast_category_root (struct ast_config *config, char *cat) |
returns the root ast_variable of a config More... | |
int | ast_check_realtime (const char *family) |
Check if realtime engine is configured for family. More... | |
static void | ast_comment_destroy (struct ast_comment **comment) |
struct ast_config * | ast_config_copy (const struct ast_config *old) |
Copies the contents of one ast_config into another. More... | |
void | ast_config_destroy (struct ast_config *cfg) |
Destroys a config. More... | |
int | ast_config_engine_deregister (struct ast_config_engine *del) |
Deregister config engine. More... | |
int | ast_config_engine_register (struct ast_config_engine *new) |
Register config engine. More... | |
struct ast_category * | ast_config_get_current_category (const struct ast_config *cfg) |
Retrieve the current category name being built. More... | |
int | ast_config_hook_register (const char *name, const char *filename, const char *module, enum config_hook_flags flags, config_hook_cb hook_cb) |
Register a config hook for a particular file and module. More... | |
void | ast_config_hook_unregister (const char *name) |
Unregister a config hook. More... | |
struct ast_config * | ast_config_internal_load (const char *filename, struct ast_config *cfg, struct ast_flags flags, const char *suggested_include_file, const char *who_asked) |
struct ast_config * | ast_config_load2 (const char *filename, const char *who_asked, struct ast_flags flags) |
Load a config file. More... | |
struct ast_config * | ast_config_new (void) |
Create a new base configuration structure. More... | |
const char * | ast_config_option (struct ast_config *cfg, const char *cat, const char *var) |
Retrieve a configuration variable within the configuration set. More... | |
void | ast_config_set_current_category (struct ast_config *cfg, const struct ast_category *cat) |
Set the category within the configuration as being current. More... | |
void | ast_config_sort_categories (struct ast_config *config, int descending, int(*comparator)(struct ast_category *p, struct ast_category *q)) |
Sorts categories in a config in the order of a numerical value contained within them. More... | |
int | ast_config_text_file_save (const char *configfile, const struct ast_config *cfg, const char *generator) |
Save a config text file preserving the pre 13.2 behavior. More... | |
int | ast_config_text_file_save2 (const char *configfile, const struct ast_config *cfg, const char *generator, uint32_t flags) |
Save a config text file. More... | |
int | ast_destroy_realtime (const char *family, const char *keyfield, const char *lookup,...) |
Destroy realtime configuration. More... | |
int | ast_destroy_realtime_fields (const char *family, const char *keyfield, const char *lookup, const struct ast_variable *fields) |
Destroy realtime configuration. More... | |
static void | ast_destroy_template_list (struct ast_category *cat) |
struct ast_config_include * | ast_include_find (struct ast_config *conf, const char *included_file) |
struct ast_config_include * | ast_include_new (struct ast_config *conf, const char *from_file, const char *included_file, int is_exec, const char *exec_file, int from_lineno, char *real_included_file_name, int real_included_file_name_size) |
void | ast_include_rename (struct ast_config *conf, const char *from_file, const char *to_file) |
static void | ast_includes_destroy (struct ast_config_include *incls) |
struct ast_variable * | ast_load_realtime (const char *family,...) |
struct ast_variable * | ast_load_realtime_all (const char *family,...) |
struct ast_variable * | ast_load_realtime_all_fields (const char *family, const struct ast_variable *fields) |
struct ast_variable * | ast_load_realtime_fields (const char *family, const struct ast_variable *fields) |
Retrieve realtime configuration. More... | |
struct ast_config * | ast_load_realtime_multientry (const char *family,...) |
Retrieve realtime configuration. More... | |
struct ast_config * | ast_load_realtime_multientry_fields (const char *family, const struct ast_variable *fields) |
Retrieve realtime configuration. More... | |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
int | ast_parse_arg (const char *arg, enum ast_parse_flags flags, void *p_result,...) |
Helper function to parse arguments See documentation in config.h. More... | |
static int | ast_realtime_append_mapping (const char *name, const char *driver, const char *database, const char *table, int priority) |
char * | ast_realtime_decode_chunk (char *chunk) |
Remove standard encoding from realtime values, which ensures that a semicolon embedded within a single value is not treated upon retrieval as multiple values. More... | |
int | ast_realtime_enabled (void) |
Check if there's any realtime engines loaded. More... | |
char * | ast_realtime_encode_chunk (struct ast_str **dest, ssize_t maxlen, const char *chunk) |
Encodes a chunk of data for realtime. More... | |
int | ast_realtime_is_mapping_defined (const char *family) |
Determine if a mapping exists for a given family. More... | |
int | ast_realtime_require_field (const char *family,...) |
Inform realtime what fields that may be stored. More... | |
int | ast_store_realtime (const char *family,...) |
Create realtime configuration. More... | |
int | ast_store_realtime_fields (const char *family, const struct ast_variable *fields) |
Create realtime configuration. More... | |
int | ast_unload_realtime (const char *family) |
Release any resources cached for a realtime family. More... | |
int | ast_update2_realtime (const char *family,...) |
Update realtime configuration. More... | |
int | ast_update2_realtime_fields (const char *family, const struct ast_variable *lookup_fields, const struct ast_variable *update_fields) |
Update realtime configuration. More... | |
int | ast_update_realtime (const char *family, const char *keyfield, const char *lookup,...) |
Update realtime configuration. More... | |
int | ast_update_realtime_fields (const char *family, const char *keyfield, const char *lookup, const struct ast_variable *fields) |
Update realtime configuration. More... | |
void | ast_variable_append (struct ast_category *category, struct ast_variable *variable) |
struct ast_variable * | ast_variable_browse (const struct ast_config *config, const char *category) |
int | ast_variable_delete (struct ast_category *category, const char *variable, const char *match, const char *line) |
static void | ast_variable_destroy (struct ast_variable *doomed) |
const char * | ast_variable_find (const struct ast_category *category, const char *variable) |
Gets a variable value from a specific category structure by name. More... | |
const char * | ast_variable_find_in_list (const struct ast_variable *list, const char *variable) |
Gets the value of a variable from a variable list by name. More... | |
const char * | ast_variable_find_last_in_list (const struct ast_variable *list, const char *variable) |
Gets the value of the LAST occurrence of a variable from a variable list. More... | |
const struct ast_variable * | ast_variable_find_variable_in_list (const struct ast_variable *list, const char *variable_name) |
Gets a variable from a variable list by name. More... | |
void | ast_variable_insert (struct ast_category *category, struct ast_variable *variable, const char *line) |
struct ast_variable * | ast_variable_list_append_hint (struct ast_variable **head, struct ast_variable *search_hint, struct ast_variable *newvar) |
Appends a variable list to the end of another list. More... | |
struct ast_variable * | ast_variable_list_from_quoted_string (const char *input, const char *item_separator, const char *name_value_separator, const char *quote_str) |
Parse a string into an ast_variable list. The reverse of ast_variable_list_join. More... | |
struct ast_variable * | ast_variable_list_from_string (const char *input, const char *item_separator, const char *name_value_separator) |
Parse a string into an ast_variable list. The reverse of ast_variable_list_join. More... | |
struct ast_str * | ast_variable_list_join (const struct ast_variable *head, const char *item_separator, const char *name_value_separator, const char *quote_char, struct ast_str **str) |
Join an ast_variable list with specified separators and quoted values. More... | |
int | ast_variable_list_replace (struct ast_variable **head, struct ast_variable *replacement) |
Replace a variable in the given list with a new value. More... | |
int | ast_variable_list_replace_variable (struct ast_variable **head, struct ast_variable *old, struct ast_variable *new) |
Replace a variable in the given list with a new variable. More... | |
struct ast_variable * | ast_variable_list_sort (struct ast_variable *start) |
Performs an in-place sort on the variable list by ascending name. More... | |
int | ast_variable_lists_match (const struct ast_variable *left, const struct ast_variable *right, int exact_match) |
Tests 2 variable lists to see if they match. More... | |
static void | ast_variable_move (struct ast_variable *dst_var, struct ast_variable *src_var) |
const char * | ast_variable_retrieve (struct ast_config *config, const char *category, const char *variable) |
const char * | ast_variable_retrieve_filtered (struct ast_config *config, const char *category, const char *variable, const char *filter) |
Gets a variable by context and variable names. More... | |
int | ast_variable_update (struct ast_category *category, const char *variable, const char *value, const char *match, unsigned int object) |
Update variable value within a config. More... | |
void | ast_variables_destroy (struct ast_variable *var) |
Free variable list. More... | |
struct ast_variable * | ast_variables_dup (struct ast_variable *var) |
Duplicate variable list. More... | |
int | ast_variables_match (const struct ast_variable *left, const struct ast_variable *right) |
Tests 2 variable values to see if they match. More... | |
struct ast_variable * | ast_variables_reverse (struct ast_variable *var) |
Reverse a variable list. More... | |
static struct ast_category * | category_get_sep (const struct ast_config *config, const char *category_name, const char *filter, char sep, char pointer_match_possible) |
static void | CB_ADD (struct ast_str **cb, const char *str) |
static void | CB_ADD_LEN (struct ast_str **cb, const char *str, int len) |
static void | CB_RESET (struct ast_str *cb, struct ast_str *llb) |
static int | cfmstat_cmp (struct cache_file_mtime *cfmtime, struct stat *statbuf) |
static void | cfmstat_save (struct cache_file_mtime *cfmtime, struct stat *statbuf) |
static struct cache_file_mtime * | cfmtime_new (const char *filename, const char *who_asked) |
static void | clear_config_maps (void) |
static void | config_cache_attribute (const char *configfile, enum config_cache_attribute_enum attrtype, const char *filename, const char *who_asked) |
static void | config_cache_destroy_entry (struct cache_file_mtime *cfmtime) |
static void | config_cache_flush_includes (struct cache_file_mtime *cfmtime) |
static void | config_cache_remove (const char *filename, const char *who_asked) |
static void | config_hook_exec (const char *filename, const char *module, const struct ast_config *cfg) |
static void | config_shutdown (void) |
static struct ast_config * | config_text_file_load (const char *database, const char *table, const char *filename, struct ast_config *cfg, struct ast_flags flags, const char *suggested_include_file, const char *who_asked) |
static int | count_linefeeds (char *str) |
static int | count_linefeeds_in_comments (struct ast_comment *x) |
static int | does_category_match (struct ast_category *cat, const char *category_name, const char *match, char sep) |
Returns true if ALL of the regex expressions and category name match. Both can be NULL (I.E. no predicate) which results in a true return;. More... | |
static struct ast_config_engine * | find_engine (const char *family, int priority, char *database, int dbsiz, char *table, int tabsiz) |
Find realtime engine for realtime family. More... | |
static void | gen_header (FILE *f1, const char *configfile, const char *fn, const char *generator) |
static char * | handle_cli_config_list (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_config_reload (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_core_show_config_mappings (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static int | handle_include_exec (const char *command, const char *output_file) |
static int | hash_string (const void *obj, const int flags) |
static int | hashtab_compare_strings (void *a, void *b, int flags) |
static int | hook_cmp (void *obj, void *arg, int flags) |
static void | hook_destroy (void *obj) |
static int | hook_hash (const void *obj, const int flags) |
static void | inclfile_destroy (void *obj) |
static int | init_appendbuf (void *data) |
static void | insert_leading_blank_lines (FILE *fp, struct inclfile *fi, struct ast_comment *precomments, int lineno) |
static int | is_writable (const char *fn) |
static int | load_module (void) |
static void | make_fn (char *fn, size_t fn_size, const char *file, const char *configfile) |
static void | move_variables (struct ast_category *old, struct ast_category *new) |
static struct ast_category * | new_category (const char *name, const char *in_file, int lineno, int template) |
static struct ast_category * | next_available_category (struct ast_category *cat, const char *name, const char *filter) |
static int | process_text_line (struct ast_config *cfg, struct ast_category **cat, char *buf, int lineno, const char *configfile, struct ast_flags flags, struct ast_str *comment_buffer, struct ast_str *lline_buffer, const char *suggested_include_file, struct ast_category **last_cat, struct ast_variable **last_var, const char *who_asked) |
parse one line in the configuration. More... | |
static int | realtime_arguments_to_fields2 (va_list ap, int skip, struct ast_variable **result) |
int | register_config_cli (void) |
Exposed initialization method for core process. More... | |
static int | reload_module (void) |
static struct inclfile * | set_fn (char *fn, size_t fn_size, const char *file, const char *configfile, struct ao2_container *fileset) |
static int | unload_module (void) |
static struct ast_variable * | variable_clone (const struct ast_variable *old) |
static struct ast_variable * | variable_list_switch (struct ast_variable *l1, struct ast_variable *l2) |
Variables | |
static struct ast_module_info | __mod_info = { .name = "extconfig" , .flags = AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER , .description = "Configuration" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .reload = reload_module, .load_pri = 0, } |
static struct ast_threadstorage | appendbuf = { .once = PTHREAD_ONCE_INIT , .key_init = __init_appendbuf , .custom_init = init_appendbuf , } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ao2_container * | cfg_hooks |
static struct cfmtime_head | cfmtime_head = { .first = NULL, .last = NULL, .lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } , } |
static struct ast_cli_entry | cli_config [] |
static struct ast_config_engine * | config_engine_list |
static ast_mutex_t | config_lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } |
static struct ast_config_map * | config_maps = NULL |
static char * | extconfig_conf = "extconfig.conf" |
static struct ast_config_engine | text_file_engine |
Configuration File Parser.
Includes the Asterisk Realtime API - ARA See https://docs.asterisk.org
Definition in file main/config.c.
#define AST_MODULE "extconfig" |
Definition at line 36 of file main/config.c.
#define CB_SIZE 250 /* initial size of comment buffers */ |
Definition at line 128 of file main/config.c.
#define COMMENT_END "--;" |
Definition at line 65 of file main/config.c.
#define COMMENT_META ';' |
Definition at line 66 of file main/config.c.
#define COMMENT_START ";--" |
Definition at line 64 of file main/config.c.
#define COMMENT_TAG '-' |
Definition at line 67 of file main/config.c.
#define MAX_INCLUDE_LEVEL 10 |
Definition at line 218 of file main/config.c.
#define MAX_NESTED_COMMENTS 128 |
Definition at line 63 of file main/config.c.
#define MIN_VARIABLE_FNAME_SPACE 40 |
Define the minimum filename space to reserve for each ast_variable in case the filename is renamed later by ast_include_rename().
Definition at line 74 of file main/config.c.
#define realtime_arguments_to_fields | ( | ap, | |
result | |||
) | realtime_arguments_to_fields2(ap, 0, result) |
Definition at line 3352 of file main/config.c.
#define UTF8_BOM "\xEF\xBB\xBF" |
Enumerator | |
---|---|
ATTRIBUTE_INCLUDE | |
ATTRIBUTE_EXEC |
Definition at line 1684 of file main/config.c.
|
static |
Definition at line 125 of file main/config.c.
|
static |
Definition at line 4367 of file main/config.c.
|
static |
Definition at line 4367 of file main/config.c.
struct ast_variable * _ast_variable_new | ( | const char * | name, |
const char * | value, | ||
const char * | filename, | ||
const char * | file, | ||
const char * | func, | ||
int | lineno | ||
) |
Definition at line 289 of file main/config.c.
References __ast_calloc(), ast_variable::file, make_ari_stubs::file, ast_variable::lineno, MIN_VARIABLE_FNAME_SPACE, name, ast_variable::name, ast_variable::stuff, ast_variable::value, and value.
|
static |
Definition at line 154 of file main/config.c.
References ast_calloc, ast_str_buffer(), ast_str_strlen(), ast_comment::cmt, and NULL.
Referenced by config_text_file_load(), and process_text_line().
void ast_category_append | ( | struct ast_config * | config, |
struct ast_category * | category | ||
) |
Appends a category to a config.
config | which config to use |
category | category to insert |
Definition at line 1165 of file main/config.c.
References config, ast_category::include_level, ast_category::next, NULL, and ast_category::prev.
Referenced by append_row_to_cfg(), ast_config_copy(), AST_TEST_DEFINE(), build_cfg(), config_curl(), config_ldap(), config_mysql(), config_odbc(), config_pgsql(), handle_updates(), process_text_line(), realtime_directory(), realtime_multi_curl(), realtime_multi_ldap(), realtime_multi_mysql(), realtime_multi_odbc(), realtime_multi_pgsql(), realtime_sorcery_multi(), realtime_sorcery_store(), realtime_sorcery_update(), static_realtime_cb(), and write_password_to_file().
char * ast_category_browse | ( | struct ast_config * | config, |
const char * | prev_name | ||
) |
Browse categories.
config | Which config structure you wish to "browse" |
prev_name | A pointer to a previous category name. |
This function is kind of non-intuitive in it's use. To begin, one passes NULL as the second argument. It will return a pointer to the string of the first category in the file. From here on after, one must then pass the previous usage's return value as the second pointer, and it will return a pointer to the category name afterwards.
a | category name on success |
NULL | on failure/no-more-categories |
Definition at line 1387 of file main/config.c.
References config, ast_category::name, ast_category::next, next_available_category(), NULL, and ast_category::prev.
Referenced by __init_manager(), __queues_show(), actual_load_config(), ast_cli_perms_init(), AST_TEST_DEFINE(), check_for_old_config(), conf_exec(), find_queue_by_name_rt(), find_realtime(), iax_provision_reload(), internal_process_ast_config(), load_common(), load_config(), load_indications(), load_module(), load_moh_classes(), load_odbc_config(), load_realtime_musiconhold(), load_realtime_queues(), load_realtime_rules(), load_tech_calendars(), load_users(), mbl_load_config(), named_acl_find_realtime(), parse_config(), pbx_load_config(), pbx_load_users(), realtime_directory(), realtime_sorcery(), realtime_sorcery_multi(), realtime_switch_common(), reload(), reload_config(), reload_followme(), reload_queue_rules(), reload_queues(), search_directory(), search_directory_sub(), set_config(), set_member_value(), setup_dahdi_int(), show_users_realtime(), sla_load_config(), test_config_validity(), update_realtime_members(), and vm_change_password().
struct ast_category * ast_category_browse_filtered | ( | struct ast_config * | config, |
const char * | category_name, | ||
struct ast_category * | prev, | ||
const char * | filter | ||
) |
Browse categories with filters.
config | Which config structure you wish to "browse" |
category_name | An optional category name. Pass NULL to not restrict by category name. |
prev | A pointer to the starting category structure. Pass NULL to start at the beginning. |
filter | An optional comma-separated list of <name_regex>=<value_regex> pairs. Only categories with matching variables will be returned. The special name 'TEMPLATES' can be used with the special values 'include' or 'restrict' to include templates in the result or restrict the result to only templates. |
a | category on success |
NULL | on failure/no-more-categories |
Definition at line 1433 of file main/config.c.
References config, filter(), ast_category::next, next_available_category(), and ast_category::prev.
Referenced by action_getconfig(), action_getconfigjson(), action_listcategories(), AST_TEST_DEFINE(), ast_variable_retrieve_filtered(), handle_updates(), object_type_loaded_observer(), sorcery_config_internal_load(), and sorcery_realtime_retrieve_multiple().
struct ast_category * ast_category_delete | ( | struct ast_config * | cfg, |
struct ast_category * | cat | ||
) |
Delete a category.
cfg | which config to use |
cat | category to delete |
Definition at line 1582 of file main/config.c.
References ast_category_destroy(), config, ast_category::next, NULL, and ast_category::prev.
Referenced by AST_TEST_DEFINE(), handle_updates(), object_type_loaded_observer(), realtime_sorcery_destroy(), and realtime_sorcery_update().
void ast_category_destroy | ( | struct ast_category * | cat | ) |
Definition at line 1220 of file main/config.c.
References ast_comment_destroy(), ast_destroy_template_list(), ast_free, ast_variables_destroy(), ast_category::file, free(), ast_category::last, NULL, ast_category::precomments, ast_category::root, ast_category::sameline, and ast_category::trailing.
Referenced by ast_category_delete(), ast_config_destroy(), handle_updates(), new_category(), process_text_line(), realtime_multi_odbc(), static_realtime_cb(), and write_password_to_file().
struct ast_variable * ast_category_detach_variables | ( | struct ast_category * | cat | ) |
Definition at line 1449 of file main/config.c.
References ast_category::last, NULL, and ast_category::root.
Referenced by realtime_switch_common(), and sorcery_realtime_retrieve_multiple().
int ast_category_empty | ( | struct ast_category * | category | ) |
Removes and destroys all variables in a category.
category | category to empty |
0 | if succeeded |
-1 | if category is NULL |
Definition at line 1614 of file main/config.c.
References ast_variables_destroy(), ast_category::last, NULL, and ast_category::root.
Referenced by AST_TEST_DEFINE(), and handle_updates().
int ast_category_exist | ( | const struct ast_config * | config, |
const char * | category_name, | ||
const char * | filter | ||
) |
Check for category duplicates.
config | which config to use |
category_name | name of the category you're looking for |
filter | an optional comma-separated list of <name_regex>=<value_regex> pairs. Only categories with matching variables will be returned. The special name 'TEMPLATES' can be used with the special values 'include' or 'restrict' to include templates in the result or restrict the result to only templates. |
This will search through the categories within a given config file for a match.
Definition at line 1159 of file main/config.c.
References ast_category_get(), config, and filter().
Referenced by realtime_sorcery_store().
struct ast_variable * ast_category_first | ( | struct ast_category * | cat | ) |
given a pointer to a category, return the root variable.
return the first var of a category
Definition at line 1255 of file main/config.c.
References NULL, and ast_category::root.
Referenced by acl_order_comparator(), action_getconfig(), action_getconfigjson(), handle_aor(), handle_auth(), handle_endpoint(), handle_identify(), handle_phoneprov(), handle_registrations(), object_type_loaded_observer(), process_text_line(), sorcery_config_internal_load(), sorcery_is_criteria_met(), sorcery_is_explicit_name_met(), and wizard_apply_handler().
struct ast_category * ast_category_get | ( | const struct ast_config * | config, |
const char * | category_name, | ||
const char * | filter | ||
) |
Retrieve a category if it exists.
config | which config to use |
category_name | name of the category you're looking for |
filter | If a config contains more than 1 category with the same name, you can specify a filter to narrow the search. The filter is a comma-separated list of <name_regex>=<value_regex> pairs. Only a category with matching variables will be returned. The special name 'TEMPLATES' can be used with the special values 'include' or 'restrict' to include templates in the result or restrict the result to only templates. |
This will search through the categories within a given config file for a match.
pointer | to category if found |
NULL | if not. |
Definition at line 1120 of file main/config.c.
References category_get_sep(), config, and filter().
Referenced by add_message_id(), ast_category_exist(), ast_category_root(), AST_TEST_DEFINE(), ast_variable_browse(), handle_updates(), object_type_loaded_observer(), realtime_directory(), realtime_sorcery_destroy(), realtime_sorcery_update(), realtime_switch_common(), vm_change_password(), and vm_forwardoptions().
const char * ast_category_get_name | ( | const struct ast_category * | category | ) |
Return the name of the category.
category | category structure |
pointer | to category name if found |
NULL | if not. |
Definition at line 1126 of file main/config.c.
References ast_category::name.
Referenced by action_getconfig(), action_getconfigjson(), action_listcategories(), AST_TEST_DEFINE(), handle_aor(), handle_auth(), handle_endpoint(), handle_identify(), handle_phoneprov(), handle_registrations(), object_type_loaded_observer(), sorcery_config_internal_load(), and sorcery_is_explicit_name_met().
struct ast_str * ast_category_get_templates | ( | const struct ast_category * | category | ) |
Return the template names this category inherits from.
category | category structure |
Definition at line 1136 of file main/config.c.
References AST_LIST_EMPTY, AST_LIST_TRAVERSE, ast_str_append(), ast_str_create, first, ast_category::next, NULL, str, and ast_category::template_instances.
Referenced by action_getconfig(), and action_getconfigjson().
int ast_category_inherit | ( | struct ast_category * | existing, |
const struct ast_category * | base | ||
) |
Applies base (template) to category.
existing | existing category |
base | base category |
This function is used to apply a base (template) to an existing category
0 | if succeeded |
-1 | if the memory allocation failed |
Definition at line 1465 of file main/config.c.
References ast_calloc, AST_LIST_INSERT_TAIL, ast_variable_append(), ast_variable::inherited, ast_category_template_instance::inst, ast_category_template_instance::name, ast_category::name, ast_category::next, ast_category::root, var, and variable_clone().
Referenced by handle_updates(), and process_text_line().
int ast_category_insert | ( | struct ast_config * | config, |
struct ast_category * | cat, | ||
const char * | match | ||
) |
Inserts new category.
config | which config to use |
cat | newly created category to insert |
match | which category to insert above |
This function is used to insert a new category above another category matching the match parameter.
0 | if succeeded |
-1 | if the specified match category wasn't found |
Definition at line 1181 of file main/config.c.
References config, match(), ast_category::name, ast_category::next, NULL, and ast_category::prev.
Referenced by AST_TEST_DEFINE(), and handle_updates().
int ast_category_is_template | ( | const struct ast_category * | category | ) |
Check if category is a template.
category | category structure |
1 | if a template. |
0 | if not. |
Definition at line 1131 of file main/config.c.
References ast_category::ignored.
Referenced by action_getconfig(), and action_getconfigjson().
struct ast_category * ast_category_new | ( | const char * | name, |
const char * | in_file, | ||
int | lineno | ||
) |
Create a category.
name | name of new category |
in_file | filename which contained the new config |
lineno | line number |
Definition at line 1088 of file main/config.c.
References ast_calloc, ast_copy_string(), ast_category::file, ast_category::lineno, ast_category::name, name, new_category(), and strdup.
Referenced by ast_config_copy(), AST_TEST_DEFINE(), build_cfg(), handle_updates(), process_text_line(), realtime_sorcery_multi(), realtime_sorcery_store(), realtime_sorcery_update(), and write_password_to_file().
struct ast_category * ast_category_new_template | ( | const char * | name, |
const char * | in_file, | ||
int | lineno | ||
) |
Create a category making it a template.
name | name of new template |
in_file | filename which contained the new config |
lineno | line number |
Definition at line 1093 of file main/config.c.
References ast_category::lineno, name, and new_category().
Referenced by AST_TEST_DEFINE(), and handle_updates().
void ast_category_rename | ( | struct ast_category * | cat, |
const char * | name | ||
) |
Definition at line 1460 of file main/config.c.
References ast_copy_string(), ast_category::name, and name.
Referenced by handle_updates(), realtime_multi_curl(), realtime_multi_ldap(), realtime_multi_mysql(), realtime_multi_odbc(), and realtime_multi_pgsql().
struct ast_variable * ast_category_root | ( | struct ast_config * | config, |
char * | cat | ||
) |
returns the root ast_variable of a config
config | pointer to an ast_config data structure |
cat | name of the category for which you want the root |
Definition at line 1260 of file main/config.c.
References ast_category_get(), config, NULL, and ast_category::root.
Referenced by config_function_read(), realtime_sorcery(), and realtime_sorcery_multi().
int ast_check_realtime | ( | const char * | family | ) |
Check if realtime engine is configured for family.
family | which family/config to be checked |
Definition at line 3545 of file main/config.c.
References ast_realtime_enabled(), find_engine(), and NULL.
Referenced by __queues_show(), ast_named_acl_find(), ast_queue_log(), close_mailbox(), copy_plain_file(), handle_voicemail_show_users(), leave_voicemail(), load_module(), load_moh_classes(), load_realtime_queues(), load_realtime_rules(), local_ast_moh_start(), logger_queue_rt_start(), manager_queues_status(), manager_queues_summary(), msg_create_from_file(), rename_file(), set_member_paused(), set_member_value(), and vm_delete().
|
static |
Definition at line 524 of file main/config.c.
References ast_free, comment, ast_comment::next, and NULL.
Referenced by ast_category_destroy(), and ast_variable_destroy().
struct ast_config * ast_config_copy | ( | const struct ast_config * | orig | ) |
Copies the contents of one ast_config into another.
orig | the config to copy |
Definition at line 3261 of file main/config.c.
References ast_category_append(), ast_category_new(), ast_config_destroy(), ast_config_new(), ast_variables_dup(), ast_category::file, ast_category::last, ast_category::lineno, ast_category::name, ast_category::next, NULL, ast_category::root, and ast_config::root.
Referenced by AST_TEST_DEFINE(), and config_hook_exec().
void ast_config_destroy | ( | struct ast_config * | cfg | ) |
Destroys a config.
cfg | pointer to config data structure |
Free memory associated with a given config
Definition at line 1627 of file main/config.c.
References ast_category_destroy(), ast_free, ast_includes_destroy(), ast_variables_destroy(), free(), ast_config::includes, ast_category::next, ast_category::root, and ast_config::root.
Referenced by __ast_http_load(), __ast_http_post_load(), __ast_sorcery_apply_config(), __init_manager(), __queues_show(), _dsp_init(), aco_process_config(), action_getconfig(), action_getconfigjson(), action_listcategories(), action_updateconfig(), adsi_load(), advanced_options(), ast_cli_perms_init(), ast_config_copy(), ast_config_load2(), ast_init_logger_for_socket_console(), ast_load_realtime_multientry_fields(), AST_TEST_DEFINE(), build_cfg(), check_for_old_config(), conf_exec(), config_function_read(), config_module(), deinitialize_sorcery(), directory_exec(), do_reload(), festival_exec(), find_conf(), find_load_queue_rt_friendly(), find_realtime(), forward_message(), get_defaults(), handle_cli_dialplan_save(), hook_cb(), iax_provision_reload(), init_logger_chain(), initialize_cc_devstate_map(), initialize_cc_max_requests(), load_asterisk_conf(), load_common(), load_config(), load_config_force(), load_config_meetme(), load_indications(), load_module(), load_moh_classes(), load_odbc_config(), load_realtime_musiconhold(), load_realtime_queues(), load_realtime_rules(), load_users(), loader_config_init(), make_email_file(), mbl_load_config(), message_range_and_existence_check(), my_load_module(), named_acl_find_realtime(), notify_new_message(), object_type_loaded_observer(), odbc_load_module(), parse_config(), pbx_load_config(), pbx_load_users(), play_message(), prep_email_sub_vars(), private_enum_init(), process_config(), read_password_from_file(), read_pjproject_startup_options(), realtime_directory(), realtime_multi_mysql(), realtime_multi_pgsql(), realtime_sorcery_multi(), realtime_sqlite3_multi(), realtime_switch_common(), reload(), reload_config(), reload_followme(), reload_module(), reload_queue_rules(), reload_queues(), rtp_reload(), run_startup_commands(), set_config(), set_member_value(), setup_dahdi_int(), show_users_realtime(), sla_load_config(), smdi_load(), sorcery_config_internal_load(), sorcery_realtime_retrieve_multiple(), tds_load_module(), unload_module(), update_realtime_members(), vm_change_password(), vm_forwardoptions(), vm_msg_forward(), vm_msg_play(), vm_msg_snapshot_create(), write_password_to_file(), and xmldoc_load_documentation().
int ast_config_engine_deregister | ( | struct ast_config_engine * | del | ) |
Deregister config engine.
0 | Always |
Definition at line 3188 of file main/config.c.
References config_engine_list, config_lock, last, lock, sla_ringing_trunk::next, ast_config_engine::next, NULL, and SCOPED_MUTEX.
Referenced by unload_module().
int ast_config_engine_register | ( | struct ast_config_engine * | newconfig | ) |
Register config engine.
1 | Always |
Definition at line 3172 of file main/config.c.
References config_engine_list, config_lock, lock, ast_config_engine::next, and SCOPED_MUTEX.
Referenced by load_module().
struct ast_category * ast_config_get_current_category | ( | const struct ast_config * | cfg | ) |
Retrieve the current category name being built.
API for backend configuration engines while building a configuration set.
Definition at line 1645 of file main/config.c.
References ast_config::current.
Referenced by config_text_file_load().
int ast_config_hook_register | ( | const char * | name, |
const char * | filename, | ||
const char * | module, | ||
enum config_hook_flags | flags, | ||
config_hook_cb | hook | ||
) |
Register a config hook for a particular file and module.
name | The name of the hook you are registering. |
filename | The file whose config you wish to hook into. |
module | The module that is reloading the config. This can be useful if multiple modules may possibly reload the same file, but you are only interested when a specific module reloads the file |
flags | Flags that affect the way hooks work. |
hook | The callback to be called when config is loaded. return 0 Success return -1 Unsuccess, also known as UTTER AND COMPLETE FAILURE |
Definition at line 4317 of file main/config.c.
References ao2_alloc, AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, ao2_link, ao2_ref, ast_strdup, cfg_hooks, cfg_hook::filename, cfg_hook::hook_cb, hook_cb(), hook_cmp(), hook_destroy(), hook_hash(), cfg_hook::module, name, cfg_hook::name, and NULL.
Referenced by AST_TEST_DEFINE().
void ast_config_hook_unregister | ( | const char * | name | ) |
Unregister a config hook.
name | The name of the hook to unregister |
Definition at line 4289 of file main/config.c.
References ao2_find, ast_strdupa, cfg_hooks, name, OBJ_NODATA, OBJ_POINTER, OBJ_UNLINK, and tmp().
Referenced by AST_TEST_DEFINE().
struct ast_config * ast_config_internal_load | ( | const char * | filename, |
struct ast_config * | cfg, | ||
struct ast_flags | flags, | ||
const char * | suggested_include_file, | ||
const char * | who_asked | ||
) |
Definition at line 3294 of file main/config.c.
References ast_log, ast_test_flag, config_engine_list, CONFIG_FLAG_NOREALTIME, config_hook_exec(), CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEUNCHANGED, db, find_engine(), ast_config::include_level, ast_config_engine::load_func, LOG_WARNING, ast_config::max_include_level, NULL, result, table, and text_file_engine.
Referenced by ast_config_load2(), config_curl(), config_ldap(), config_mysql(), config_odbc(), config_pgsql(), process_text_line(), reload_module(), and static_realtime_cb().
struct ast_config * ast_config_load2 | ( | const char * | filename, |
const char * | who_asked, | ||
struct ast_flags | flags | ||
) |
Load a config file.
filename | path of file to open. If no preceding '/' character, path is considered relative to AST_CONFIG_DIR |
who_asked | The module which is making this request. |
flags | Optional flags: CONFIG_FLAG_WITHCOMMENTS - load the file with comments intact; CONFIG_FLAG_FILEUNCHANGED - check the file mtime and return CONFIG_STATUS_FILEUNCHANGED if the mtime is the same; or CONFIG_FLAG_NOCACHE - don't cache file mtime (main purpose of this option is to save memory on temporary files). |
Create a config structure from a given configuration file.
NULL | on error |
Definition at line 3336 of file main/config.c.
References ast_config_destroy(), ast_config_internal_load(), ast_config_new(), CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEUNCHANGED, NULL, and result.
Referenced by __ast_http_load(), __ast_http_post_load(), __ast_sorcery_apply_config(), __init_manager(), _dsp_init(), action_getconfig(), action_getconfigjson(), action_listcategories(), action_updateconfig(), ast_cli_perms_init(), ast_init_logger_for_socket_console(), AST_TEST_DEFINE(), do_reload(), iax_provision_reload(), init_logger_chain(), initialize_cc_devstate_map(), initialize_cc_max_requests(), load_asterisk_conf(), load_config(), load_indications(), loader_config_init(), object_type_loaded_observer(), private_enum_init(), read_pjproject_startup_options(), rtp_reload(), run_startup_commands(), set_config(), sorcery_config_internal_load(), and xmldoc_load_documentation().
struct ast_config * ast_config_new | ( | void | ) |
Create a new base configuration structure.
Definition at line 1488 of file main/config.c.
References ast_calloc, config, and MAX_INCLUDE_LEVEL.
Referenced by alloc_and_initialize_sorcery(), ast_config_copy(), ast_config_load2(), AST_TEST_DEFINE(), build_cfg(), find_load_queue_rt_friendly(), realtime_multi_curl(), realtime_multi_ldap(), realtime_multi_mysql(), realtime_multi_odbc(), realtime_multi_pgsql(), realtime_sorcery_multi(), realtime_sqlite3_multi(), reload_module(), setup_dahdi_int(), and write_password_to_file().
const char * ast_config_option | ( | struct ast_config * | cfg, |
const char * | cat, | ||
const char * | var | ||
) |
Retrieve a configuration variable within the configuration set.
Retrieves the named variable var
within category cat
of configuration set cfg
. If not found, attempts to retrieve the named variable var
from within category general.
var
, or NULL if not found. Definition at line 774 of file main/config.c.
References ast_variable_retrieve(), tmp(), and var.
Referenced by actual_load_config(), pbx_load_users(), process_config(), and search_directory_sub().
void ast_config_set_current_category | ( | struct ast_config * | cfg, |
const struct ast_category * | cat | ||
) |
Set the category within the configuration as being current.
API for backend configuration engines while building a configuration set.
Definition at line 1650 of file main/config.c.
References ast_config::current.
Referenced by process_text_line().
void ast_config_sort_categories | ( | struct ast_config * | config, |
int | descending, | ||
int(*)(struct ast_category *p, struct ast_category *q) | comparator | ||
) |
Sorts categories in a config in the order of a numerical value contained within them.
config | The config structure you wish to sort |
comparator | variable Which numerical value you wish to sort by |
descending | If true, we sort highest to lowest instead of lowest to highest |
This function will assume a value of 0 for any non-numerical strings and NULL fields.
Definition at line 1269 of file main/config.c.
References config, ast_category::next, and NULL.
Referenced by named_acl_find_realtime(), and realtime_switch_common().
int ast_config_text_file_save | ( | const char * | filename, |
const struct ast_config * | cfg, | ||
const char * | generator | ||
) |
Save a config text file preserving the pre 13.2 behavior.
filename | Filename |
cfg | ast_config |
generator | generator |
0 | on success. |
-1 | on failure. |
Definition at line 2716 of file main/config.c.
References ast_config_text_file_save2(), and CONFIG_SAVE_FLAG_PRESERVE_EFFECTIVE_CONTEXT.
Referenced by add_message_id(), AST_TEST_DEFINE(), vm_change_password(), vm_forwardoptions(), and write_password_to_file().
int ast_config_text_file_save2 | ( | const char * | filename, |
const struct ast_config * | cfg, | ||
const char * | generator, | ||
uint32_t | flags | ||
) |
Save a config text file.
filename | Filename |
cfg | ast_config |
generator | generator |
flags | List of config_save_flags |
0 | on success. |
-1 | on failure. |
Definition at line 2740 of file main/config.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, ao2_ref, ast_debug, ast_escape_semicolons(), AST_LIST_EMPTY, AST_LIST_LAST, AST_LIST_TRAVERSE, ast_log, ast_verb, ast_comment::cmt, config_hook_exec(), CONFIG_SAVE_FLAG_PRESERVE_EFFECTIVE_CONTEXT, errno, ast_config_include::exec, ast_config_include::exec_file, ast_category::file, gen_header(), hash_string(), hashtab_compare_strings(), ast_category::ignored, ast_config_include::include_location_file, ast_config_include::include_location_lineno, ast_config_include::included_file, ast_config::includes, insert_leading_blank_lines(), ast_category_template_instance::inst, is_writable(), ast_category::lineno, LOG_ERROR, make_fn(), ast_variable::name, ast_category_template_instance::name, ast_category::name, ast_variable::next, ast_comment::next, ast_category::next, ast_config_include::next, NULL, ast_config_include::output, PATH_MAX, ast_category::precomments, ast_category::root, ast_config::root, ast_category::sameline, set_fn(), ast_category::template_instances, ast_category::trailing, ast_variable::value, and var.
Referenced by action_updateconfig(), and ast_config_text_file_save().
int ast_destroy_realtime | ( | const char * | family, |
const char * | keyfield, | ||
const char * | lookup, | ||
... | |||
) |
Destroy realtime configuration.
family | which family/config to be destroyed |
keyfield | which field to use as the key |
lookup | which value to look for in the key field to match the entry. |
This function is used to destroy an entry in realtime configuration space. Additional params are used as keys.
Definition at line 3791 of file main/config.c.
References ast_destroy_realtime_fields(), ast_variables_destroy(), NULL, RAII_VAR, and realtime_arguments_to_fields.
Referenced by cli_realtime_destroy(), function_realtime_readdestroy(), leave_voicemail(), msg_create_from_file(), and vm_delete().
int ast_destroy_realtime_fields | ( | const char * | family, |
const char * | keyfield, | ||
const char * | lookup, | ||
const struct ast_variable * | fields | ||
) |
Destroy realtime configuration.
family | which family/config to be destroyed |
keyfield | which field to use as the key |
lookup | which value to look for in the key field to match the entry. |
fields | fields themselves |
This function is used to destroy an entry in realtime configuration space. Additional params are used as keys.
Definition at line 3771 of file main/config.c.
References db, ast_config_engine::destroy_func, find_engine(), and table.
Referenced by ast_destroy_realtime(), and sorcery_realtime_delete().
|
static |
Definition at line 1212 of file main/config.c.
References ast_free, AST_LIST_REMOVE_HEAD, ast_category::next, and ast_category::template_instances.
Referenced by ast_category_destroy().
struct ast_config_include * ast_include_find | ( | struct ast_config * | conf, |
const char * | included_file | ||
) |
Definition at line 476 of file main/config.c.
References ast_config_include::included_file, and ast_config_include::next.
Referenced by ast_include_new().
struct ast_config_include * ast_include_new | ( | struct ast_config * | conf, |
const char * | from_file, | ||
const char * | included_file, | ||
int | is_exec, | ||
const char * | exec_file, | ||
int | from_lineno, | ||
char * | real_included_file_name, | ||
int | real_included_file_name_size | ||
) |
Definition at line 336 of file main/config.c.
References ast_calloc, ast_include_find(), ast_includes_destroy(), ast_log, ast_strdup, ast_strlen_zero(), ast_config_include::exec, ast_config_include::exec_file, ast_config_include::include_location_file, ast_config_include::include_location_lineno, ast_config_include::included_file, ast_config_include::inclusion_count, LOG_WARNING, ast_config_include::next, and NULL.
Referenced by AST_TEST_DEFINE(), and process_text_line().
void ast_include_rename | ( | struct ast_config * | conf, |
const char * | from_file, | ||
const char * | to_file | ||
) |
Definition at line 384 of file main/config.c.
References ast_free, ast_strdup, ast_variable_destroy(), ast_variable_move(), ast_variable_new, ast_variable::file, ast_category::file, ast_config_include::include_location_file, ast_category::last, name, ast_variable::name, ast_variable::next, ast_category::next, ast_config_include::next, ast_category::root, str, and ast_variable::value.
Referenced by action_updateconfig().
|
static |
Definition at line 1233 of file main/config.c.
References ast_free, ast_config_include::exec_file, ast_config_include::include_location_file, ast_config_include::included_file, and ast_config_include::next.
Referenced by ast_config_destroy(), and ast_include_new().
struct ast_variable * ast_load_realtime | ( | const char * | family, |
... | |||
) |
Definition at line 3521 of file main/config.c.
References ast_load_realtime_fields(), ast_variables_destroy(), NULL, RAII_VAR, and realtime_arguments_to_fields.
Referenced by conf_run(), copy_plain_file(), find_conf_realtime(), find_load_queue_rt_friendly(), find_realtime(), find_user_realtime(), leave_queue(), load_realtime_musiconhold(), queue_function_queuegetchannel(), queue_function_queuewaitingcount(), realtime_peer(), realtime_switch_common(), realtime_user(), and rt_extend_conf().
struct ast_variable * ast_load_realtime_all | ( | const char * | family, |
... | |||
) |
Definition at line 3469 of file main/config.c.
References ast_load_realtime_all_fields(), ast_variables_destroy(), NULL, RAII_VAR, and realtime_arguments_to_fields.
Referenced by cli_realtime_load(), function_realtime_read(), function_realtime_readdestroy(), and realtimefield_read().
struct ast_variable * ast_load_realtime_all_fields | ( | const char * | family, |
const struct ast_variable * | fields | ||
) |
Definition at line 3448 of file main/config.c.
References db, find_engine(), NULL, ast_config_engine::realtime_func, and table.
Referenced by ast_load_realtime_all(), and ast_load_realtime_fields().
struct ast_variable * ast_load_realtime_fields | ( | const char * | family, |
const struct ast_variable * | fields | ||
) |
Retrieve realtime configuration.
family | which family/config to lookup |
fields | which fields to lookup |
This will use builtin configuration backends to look up a particular entity in realtime and return a variable list of its parameters.
Definition at line 3486 of file main/config.c.
References ast_load_realtime_all_fields(), ast_strlen_zero(), ast_variable_destroy(), ast_variable::next, ast_category::next, ast_category::prev, and ast_variable::value.
Referenced by ast_load_realtime(), and sorcery_realtime_retrieve_fields().
struct ast_config * ast_load_realtime_multientry | ( | const char * | family, |
... | |||
) |
Retrieve realtime configuration.
family | which family/config to lookup |
This will use builtin configuration backends to look up a particular entity in realtime and return a variable list of its parameters. Unlike the ast_load_realtime, this function can return more than one entry and is thus stored inside a traditional ast_config structure rather than just returning a linked list of variables.
NULL | Error or no results returned |
Definition at line 3637 of file main/config.c.
References ast_load_realtime_multientry_fields(), ast_variables_destroy(), NULL, RAII_VAR, and realtime_arguments_to_fields.
Referenced by __queues_show(), conf_exec(), find_load_queue_rt_friendly(), find_realtime(), load_module(), load_realtime_musiconhold(), load_realtime_queues(), load_realtime_rules(), named_acl_find_realtime(), realtime_directory(), realtime_switch_common(), set_member_value(), show_users_realtime(), and update_realtime_members().
struct ast_config * ast_load_realtime_multientry_fields | ( | const char * | family, |
const struct ast_variable * | fields | ||
) |
Retrieve realtime configuration.
family | which family/config to lookup |
fields | list of fields |
This will use builtin configuration backends to look up a particular entity in realtime and return a variable list of its parameters. Unlike the ast_load_realtime, this function can return more than one entry and is thus stored inside a traditional ast_config structure rather than just returning a linked list of variables.
NULL | Error or no results returned |
Definition at line 3611 of file main/config.c.
References ast_config_destroy(), db, find_engine(), NULL, ast_config_engine::realtime_multi_func, ast_config::root, and table.
Referenced by ast_load_realtime_multientry(), and sorcery_realtime_retrieve_multiple().
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 4367 of file main/config.c.
int ast_parse_arg | ( | const char * | arg, |
enum ast_parse_flags | flags, | ||
void * | p_result, | ||
... | |||
) |
Helper function to parse arguments See documentation in config.h.
The argument parsing routine.
Definition at line 3842 of file main/config.c.
References ast_app_parse_timelen(), ast_debug, ast_inet_ntoa(), ast_skip_blanks(), ast_sockaddr_parse(), ast_sockaddr_resolve_first_af(), ast_sockaddr_stringify(), ast_sockaddr_to_sin, ast_strdupa, ast_strlen_zero(), buf, errno, error(), INT32_MAX, INT32_MIN, NULL, PARSE_ADDR, PARSE_DEFAULT, PARSE_DOUBLE, PARSE_IN_RANGE, PARSE_INADDR, PARSE_INT32, PARSE_OUT_RANGE, PARSE_PORT_FORBID, PARSE_PORT_IGNORE, PARSE_PORT_MASK, PARSE_PORT_REQUIRE, PARSE_RANGE_DEFAULTS, PARSE_TIMELEN, PARSE_TYPE, PARSE_UINT32, result, strsep(), tmp(), and UINT32_MAX.
Referenced by __ast_http_load(), __init_manager(), app_exec(), AST_TEST_DEFINE(), ast_tls_read_conf(), build_peer(), build_user(), configure_local_rtp(), double_handler_fn(), general_set(), iax2_call(), iax2_request(), int_handler_fn(), load_asterisk_conf(), load_config(), new_realtime_sqlite3_db(), realtime_peer(), reload_config(), rtp_reload(), sample_rate_handler(), set_config(), setup_rtp_connection(), setup_rtp_remote(), setup_udptl_connection(), sockaddr_handler_fn(), timelen_handler_fn(), uint_handler_fn(), and xfer_set().
|
static |
Definition at line 3055 of file main/config.c.
References ast_calloc, ast_verb, config_maps, ast_config_map::database, ast_config_map::driver, name, ast_config_map::name, ast_config_map::next, priority, ast_config_map::priority, ast_config_map::stuff, table, and ast_config_map::table.
Referenced by load_module(), and reload_module().
char * ast_realtime_decode_chunk | ( | char * | chunk | ) |
Remove standard encoding from realtime values, which ensures that a semicolon embedded within a single value is not treated upon retrieval as multiple values.
chunk | Data to be decoded |
Definition at line 3810 of file main/config.c.
Referenced by realtime_multi_pgsql(), and realtime_pgsql().
int ast_realtime_enabled | ( | void | ) |
Check if there's any realtime engines loaded.
Definition at line 3559 of file main/config.c.
References config_maps.
Referenced by action_coresettings(), ast_check_realtime(), and handle_show_settings().
char * ast_realtime_encode_chunk | ( | struct ast_str ** | dest, |
ssize_t | maxlen, | ||
const char * | chunk | ||
) |
Encodes a chunk of data for realtime.
dest | Destination buffer |
maxlen | Length passed through to ast_str_* functions |
chunk | Source data to be encoded |
Definition at line 3822 of file main/config.c.
References ast_str_append(), ast_str_buffer(), ast_str_reset(), and ast_str_set().
int ast_realtime_is_mapping_defined | ( | const char * | family | ) |
Determine if a mapping exists for a given family.
family | which family you are looking to see if a mapping exists for |
1 | if it is mapped |
0 | if it is not |
Definition at line 3208 of file main/config.c.
References ast_debug, config_lock, config_maps, lock, ast_config_map::name, ast_config_map::next, and SCOPED_MUTEX.
Referenced by ast_named_acl_find(), and sorcery_realtime_open().
int ast_realtime_require_field | ( | const char * | family, |
... | |||
) |
Inform realtime what fields that may be stored.
family | which family/config is referenced |
This will inform builtin configuration backends that particular fields may be updated during the use of that configuration section. This is mainly to be used during startup routines, to ensure that various fields exist in the backend. The backends may take various actions, such as creating new fields in the data store or warning the administrator that new fields may need to be created, in order to ensure proper function.
The arguments are specified in groups of 3: column name, column type, and column size. The column types are specified as integer constants, defined by the enum require_type. Note that the size is specified as the number of equivalent character fields that a field may take up, even if a field is otherwise specified as an integer type. This is due to the fact that some fields have historically been specified as character types, even if they contained integer values.
A family should always specify its fields to the minimum necessary requirements to fulfill all possible values (within reason; for example, a timeout value may reasonably be specified as an INTEGER2, with size 5. Even though values above 32767 seconds are possible, they are unlikely to be useful, and we should not complain about that size).
0 | Required fields met specified standards |
-1 | One or more fields was missing or insufficient |
TODO The return value of this function is routinely ignored. Ignoring the return value means that it's mostly pointless to be calling this. You'll see some warning messages potentially, but that's it.
XXX This function is super useful for detecting configuration problems early, but unfortunately, the latest in configuration management, sorcery, doesn't work well with this. Users of sorcery are familiar with the fields they will need to write but don't know if realtime is being used. Sorcery knows what storage mechanism is being used but has no high-level knowledge of what sort of data is going to be written.
Definition at line 3564 of file main/config.c.
References db, find_engine(), ast_config_engine::require_func, and table.
Referenced by ast_queue_log(), change_password_realtime(), conf_run(), load_module(), and logger_queue_rt_start().
int ast_store_realtime | ( | const char * | family, |
... | |||
) |
Create realtime configuration.
family | which family/config to be created |
This function is used to create a parameter in realtime configuration space.
Definition at line 3755 of file main/config.c.
References ast_store_realtime_fields(), ast_variables_destroy(), NULL, RAII_VAR, and realtime_arguments_to_fields.
Referenced by ast_queue_log(), cli_realtime_store(), copy_plain_file(), function_realtime_store(), leave_voicemail(), and msg_create_from_file().
int ast_store_realtime_fields | ( | const char * | family, |
const struct ast_variable * | fields | ||
) |
Create realtime configuration.
family | which family/config to be created |
fields | fields themselves |
This function is used to create a parameter in realtime configuration space.
Definition at line 3734 of file main/config.c.
References db, find_engine(), ast_config_engine::store_func, and table.
Referenced by ast_store_realtime(), and sorcery_realtime_create().
int ast_unload_realtime | ( | const char * | family | ) |
Release any resources cached for a realtime family.
family | which family/config to destroy |
Various backends may cache attributes about a realtime data storage facility; on reload, a front end resource may request to purge that cache.
0 | If any cache was purged |
-1 | If no cache was found |
Definition at line 3591 of file main/config.c.
References db, find_engine(), table, and ast_config_engine::unload_func.
Referenced by __unload_module(), load_config_force(), logger_queue_init(), reload(), reload_config(), reload_logger(), and unload_module().
int ast_update2_realtime | ( | const char * | family, |
... | |||
) |
Update realtime configuration.
family | which family/config to be updated |
This function is used to update a parameter in realtime configuration space. It includes the ability to lookup a row based upon multiple key criteria. As a result, this function includes two sentinel values, one to terminate lookup values and the other to terminate the listing of fields to update.
Definition at line 3710 of file main/config.c.
References ast_update2_realtime_fields(), ast_variables_destroy(), NULL, RAII_VAR, realtime_arguments_to_fields, and realtime_arguments_to_fields2().
Referenced by change_password_realtime(), and cli_realtime_update2().
int ast_update2_realtime_fields | ( | const char * | family, |
const struct ast_variable * | lookup_fields, | ||
const struct ast_variable * | update_fields | ||
) |
Update realtime configuration.
family | which family/config to be updated |
lookup_fields | fields used to look up entries |
update_fields | fields to update |
This function is used to update a parameter in realtime configuration space. It includes the ability to lookup a row based upon multiple key criteria. As a result, this function includes two sentinel values, one to terminate lookup values and the other to terminate the listing of fields to update.
Definition at line 3690 of file main/config.c.
References db, find_engine(), table, and ast_config_engine::update2_func.
Referenced by ast_update2_realtime().
int ast_update_realtime | ( | const char * | family, |
const char * | keyfield, | ||
const char * | lookup, | ||
... | |||
) |
Update realtime configuration.
family | which family/config to be updated |
keyfield | which field to use as the key |
lookup | which value to look for in the key field to match the entry. |
This function is used to update a parameter in realtime configuration space.
Definition at line 3674 of file main/config.c.
References ast_update_realtime_fields(), ast_variables_destroy(), NULL, RAII_VAR, and realtime_arguments_to_fields.
Referenced by cli_realtime_update(), conf_run(), function_realtime_write(), leave_voicemail(), realtime_update_peer(), rename_file(), rt_extend_conf(), set_queue_member_pause(), and update_realtime_member_field().
int ast_update_realtime_fields | ( | const char * | family, |
const char * | keyfield, | ||
const char * | lookup, | ||
const struct ast_variable * | fields | ||
) |
Update realtime configuration.
family | which family/config to be updated |
keyfield | which field to use as the key |
lookup | which value to look for in the key field to match the entry. |
fields | fields to update |
This function is used to update a parameter in realtime configuration space.
Definition at line 3653 of file main/config.c.
References db, find_engine(), table, and ast_config_engine::update_func.
Referenced by ast_update_realtime(), and sorcery_realtime_update().
void ast_variable_append | ( | struct ast_category * | category, |
struct ast_variable * | variable | ||
) |
Definition at line 487 of file main/config.c.
References ast_category::last, ast_variable::next, and ast_category::root.
Referenced by add_message_id(), append_row_to_cfg(), ast_category_inherit(), AST_TEST_DEFINE(), build_cfg(), config_curl(), config_ldap(), config_mysql(), config_odbc(), config_pgsql(), handle_updates(), move_variables(), process_text_line(), realtime_directory(), realtime_multi_curl(), realtime_multi_ldap(), realtime_multi_mysql(), realtime_multi_odbc(), realtime_multi_pgsql(), realtime_sorcery_multi(), realtime_sorcery_store(), realtime_sorcery_update(), static_realtime_cb(), vm_change_password(), and write_password_to_file().
struct ast_variable * ast_variable_browse | ( | const struct ast_config * | config, |
const char * | category | ||
) |
Definition at line 601 of file main/config.c.
References ast_category_get(), config, NULL, and ast_category::root.
Referenced by __ast_http_load(), __ast_http_post_load(), __ast_sorcery_apply_config(), __init_manager(), _dsp_init(), aco_process_category_options(), actual_load_config(), adsi_load(), ast_cli_perms_init(), AST_TEST_DEFINE(), ast_variable_retrieve(), build_calendar(), build_device(), caldav_load_calendar(), conf_exec(), config_module(), do_reload(), do_say(), ewscal_load_calendar(), exchangecal_load_calendar(), find_conf(), get_defaults(), handle_cli_dialplan_save(), iax_template_parse(), ical_load_calendar(), init_logger_chain(), load_aliases(), load_asterisk_conf(), load_common(), load_config(), load_general_config(), load_module(), load_moh_classes(), load_odbc_config(), load_users(), load_zonemessages(), loader_config_init(), mbl_load_adapter(), mbl_load_config(), mbl_load_device(), new_realtime_sqlite3_db(), odbc_load_module(), parse_config(), parse_tone_zone(), pbx_load_config(), process_my_load_module(), read_pjproject_startup_options(), realtime_directory(), reload(), reload_config(), reload_followme(), reload_module(), reload_queue_rules(), reload_single_queue(), rtp_reload(), run_startup_commands(), search_directory_sub(), set_config(), setup_dahdi_int(), show_users_realtime(), sla_build_station(), sla_build_trunk(), smdi_load(), tds_load_module(), test_config_validity(), and xmldoc_load_documentation().
int ast_variable_delete | ( | struct ast_category * | category, |
const char * | variable, | ||
const char * | match, | ||
const char * | line | ||
) |
Definition at line 1497 of file main/config.c.
References ast_strlen_zero(), ast_variable_destroy(), ast_category::last, match(), ast_variable::name, ast_variable::next, ast_category::next, NULL, ast_category::prev, ast_category::root, and ast_variable::value.
Referenced by handle_updates().
|
static |
Definition at line 536 of file main/config.c.
References ast_comment_destroy(), ast_free, ast_variable::precomments, ast_variable::sameline, and ast_variable::trailing.
Referenced by ast_include_rename(), ast_load_realtime_fields(), ast_variable_delete(), ast_variable_update(), and ast_variables_destroy().
const char * ast_variable_find | ( | const struct ast_category * | category, |
const char * | variable | ||
) |
Gets a variable value from a specific category structure by name.
category | category structure under which the variable lies |
variable | which variable you wish to get the data for |
Goes through a given category and searches for the given variable
The | variable value on success |
NULL | if unable to find it. |
Definition at line 833 of file main/config.c.
References ast_variable_find_in_list(), and ast_category::root.
Referenced by AST_TEST_DEFINE(), ast_variable_retrieve_filtered(), and extension_length_comparator().
const char * ast_variable_find_in_list | ( | const struct ast_variable * | list, |
const char * | variable | ||
) |
Gets the value of a variable from a variable list by name.
list | variable list to search |
variable | which variable you wish to get the data for |
Goes through a given variable list and searches for the given variable
The | variable value on success |
NULL | if unable to find it. |
Definition at line 928 of file main/config.c.
References ast_variable::name, ast_variable::next, NULL, and ast_variable::value.
Referenced by ast_ari_callback(), ast_geoloc_eprofile_to_uri(), ast_geoloc_gml_validate_varlist(), ast_sorcery_changeset_create(), AST_TEST_DEFINE(), ast_variable_find(), geoloc_civicaddr_list_to_xml(), geoloc_eprofile_to_intermediate(), geoloc_gml_list_to_xml(), handle_export_primitives(), load_realtime_musiconhold(), retrieve_cert_from_url(), and validate_location_info().
const char * ast_variable_find_last_in_list | ( | const struct ast_variable * | list, |
const char * | variable | ||
) |
Gets the value of the LAST occurrence of a variable from a variable list.
list | The ast_variable list to search |
variable | The name of the ast_variable you wish to fetch data for |
Iterates over a given ast_variable list to search for the last occurrence of an ast_variable entry with a name attribute matching the given name (variable). This is useful if the list has duplicate entries (such as in cases where entries are created by a template)
The | variable value on success |
NULL | if unable to find it. |
Definition at line 940 of file main/config.c.
References ast_variable::name, ast_variable::next, NULL, and ast_variable::value.
Referenced by AST_TEST_DEFINE(), handle_aor(), handle_auth(), handle_endpoint(), handle_identify(), handle_phoneprov(), handle_registrations(), is_variable_true(), and wizard_apply_handler().
const struct ast_variable * ast_variable_find_variable_in_list | ( | const struct ast_variable * | list, |
const char * | variable_name | ||
) |
Gets a variable from a variable list by name.
list | variable list to search |
variable_name | name you wish to get the data for |
Goes through a given variable list and searches for the given variable
The | variable (not the value) on success |
NULL | if unable to find it. |
Definition at line 838 of file main/config.c.
References ast_variable::name, ast_variable::next, and NULL.
Referenced by ast_variable_lists_match(), and realtime_sorcery_store().
void ast_variable_insert | ( | struct ast_category * | category, |
struct ast_variable * | variable, | ||
const char * | line | ||
) |
Definition at line 500 of file main/config.c.
References ast_variable::lineno, ast_variable::next, and ast_category::root.
Referenced by AST_TEST_DEFINE(), and handle_updates().
struct ast_variable * ast_variable_list_append_hint | ( | struct ast_variable ** | head, |
struct ast_variable * | search_hint, | ||
struct ast_variable * | new_var | ||
) |
Appends a variable list to the end of another list.
head | A pointer to an ast_variable * of the existing variable list head. May NOT be NULL but the content may be to initialize a new list. If so, upon return, this parameter will be updated with a pointer to the new list head. |
search_hint | The place in the current list to start searching for the end of the list. Might help performance on longer lists. If NULL, it defaults to head. |
new_var | The head of the new variable list to be appended |
Definition at line 647 of file main/config.c.
References ast_assert, ast_variable::next, and NULL.
Referenced by ast_json_to_ast_variables(), ast_sorcery_objectset_create2(), and AST_TEST_DEFINE().
struct ast_variable * ast_variable_list_from_quoted_string | ( | const char * | input, |
const char * | item_separator, | ||
const char * | name_value_separator, | ||
const char * | quote_str | ||
) |
Parse a string into an ast_variable list. The reverse of ast_variable_list_join.
input | The name-value pair string to parse. |
item_separator | The string used to separate the list items. Only the first character in the string will be used. If NULL, "," will be used. |
name_value_separator | The string used to separate each item's name and value. Only the first character in the string will be used. If NULL, "=" will be used. |
quote_str | The string used to quote values. Only the first character in the string will be used. If NULL, '"' will be used. |
A | pointer to a list of ast_variables. |
NULL | if there was an error or no variables could be parsed. |
Definition at line 727 of file main/config.c.
References ast_strdupa, ast_strip(), ast_strlen_zero(), AST_STRSEP_ALL, ast_strsep_quoted(), ast_variable_list_append, ast_variable_new, ast_variables_destroy(), input(), item, NULL, and quote().
Referenced by AST_TEST_DEFINE(), and ast_variable_list_from_string().
struct ast_variable * ast_variable_list_from_string | ( | const char * | input, |
const char * | item_separator, | ||
const char * | name_value_separator | ||
) |
Parse a string into an ast_variable list. The reverse of ast_variable_list_join.
input | The name-value pair string to parse. |
item_separator | The string used to separate the list items. Only the first character in the string will be used. If NULL, "," will be used. |
name_value_separator | The string used to separate each item's name and value. Only the first character in the string will be used. If NULL, "=" will be used. |
A | pointer to a list of ast_variables. |
NULL | if there was an error or no variables could be parsed. |
Definition at line 768 of file main/config.c.
References ast_variable_list_from_quoted_string(), input(), and NULL.
struct ast_str * ast_variable_list_join | ( | const struct ast_variable * | head, |
const char * | item_separator, | ||
const char * | name_value_separator, | ||
const char * | quote_char, | ||
struct ast_str ** | str | ||
) |
Join an ast_variable list with specified separators and quoted values.
head | A pointer to an ast_variable list head. |
item_separator | The string to use to separate the list items. If NULL, "," will be used. |
name_value_separator | The string to use to separate each item's name and value. If NULL, "=" will be used. |
str | A pointer to a pre-allocated ast_str in which to put the results. If NULL, one will be allocated and returned. |
quote_char | The quote char to use for the values. May be NULL or empty for no quoting. |
A | pointer to the result ast_str. This may NOT be the same as the pointer passed in if the original ast_str wasn't large enough to hold the result. Regardless, the pointer MUST be freed after use. |
NULL | if there was an error. |
Definition at line 701 of file main/config.c.
References AST_MAX_USER_FIELD, ast_str_append(), ast_str_create, NULL, S_OR, str, and var.
Referenced by add_eprofile_to_channel(), AST_TEST_DEFINE(), geoloc_config_list_locations(), geoloc_config_show_profiles(), validate_location_info(), var_list_from_confidence(), var_list_from_loc_info(), and var_list_from_node().
int ast_variable_list_replace | ( | struct ast_variable ** | head, |
struct ast_variable * | replacement | ||
) |
Replace a variable in the given list with a new value.
head | A pointer to an ast_variable * of the existing variable list head. May NOT be NULL but the content may be to initialize a new list. If so, upon return, this parameter will be updated with a pointer to the new list head. |
replacement | The variable that replaces another variable in the list with the same name. |
0 | if a variable was replaced in the list |
-1 | if no replacement occured |
Definition at line 668 of file main/config.c.
References ast_free, ast_variable::name, and ast_variable::next.
Referenced by ast_geoloc_eprofile_refresh_location(), build_user(), check_access(), mkintf(), process_dahdi(), and set_var_handler().
int ast_variable_list_replace_variable | ( | struct ast_variable ** | head, |
struct ast_variable * | oldvar, | ||
struct ast_variable * | newvar | ||
) |
Replace a variable in the given list with a new variable.
head | A pointer to the current variable list head. Since the variable to be replaced, this pointer may be updated with the new head. |
oldvar | A pointer to the existing variable to be replaced. |
newvar | A pointer to the new variable that will replace the old one. |
0 | if a variable was replaced in the list |
-1 | if no replacement occured |
Definition at line 684 of file main/config.c.
References ast_free, and ast_variable::next.
Referenced by AST_TEST_DEFINE().
struct ast_variable * ast_variable_list_sort | ( | struct ast_variable * | head | ) |
Performs an in-place sort on the variable list by ascending name.
head | The variable list head |
Definition at line 621 of file main/config.c.
References ast_variable::name, ast_variable::next, NULL, and variable_list_switch().
Referenced by aeap_cli_show(), ast_sip_cli_print_sorcery_objectset(), and config_object_cli_show().
int ast_variable_lists_match | ( | const struct ast_variable * | left, |
const struct ast_variable * | right, | ||
int | exact_match | ||
) |
Tests 2 variable lists to see if they match.
left | Variable list to test |
right | Variable list with an optional realtime-style operator in the names |
exact_match | If true, all variables in left must match all variables in right and vice versa. This does exact value matches only. Operators aren't supported. Except for order, the left and right lists must be equal. |
If false, every variable in the right list must match some variable in the left list using the operators supplied. Variables in the left list that aren't in the right list are ignored for matching purposes.
1 | matches |
0 | doesn't match |
Iterates over the variable lists calling ast_variables_match. If any match fails or a variable in the right list isn't in the left list, 0 is returned.
Definition at line 870 of file main/config.c.
References ast_free, ast_strdup, ast_variable_find_variable_in_list(), ast_variables_match(), if(), name, ast_variable::name, ast_variable::next, and ast_variable::value.
Referenced by AST_TEST_DEFINE(), object_type_loaded_observer(), realtime_sorcery(), realtime_sorcery_multi(), sorcery_astdb_retrieve_fields_common(), sorcery_config_fields_cmp(), sorcery_memory_cache_fields_cmp(), and sorcery_memory_fields_cmp().
|
static |
Definition at line 323 of file main/config.c.
References ast_variable::blanklines, ast_variable::lineno, NULL, ast_variable::object, ast_variable::precomments, ast_variable::sameline, and ast_variable::trailing.
Referenced by ast_include_rename(), and ast_variable_update().
const char * ast_variable_retrieve | ( | struct ast_config * | config, |
const char * | category, | ||
const char * | variable | ||
) |
Definition at line 784 of file main/config.c.
References ast_variable_browse(), config, match(), ast_variable::name, ast_variable::next, ast_category::next, NULL, ast_category::root, and ast_variable::value.
Referenced by __init_manager(), __queues_show(), actual_load_config(), advanced_options(), ast_config_option(), ast_init_logger_for_socket_console(), AST_TEST_DEFINE(), check_for_old_config(), conf_exec(), config_module(), directory_exec(), festival_exec(), find_realtime(), forward_message(), get_defaults(), iax_template_parse(), init_acf_query(), init_logger_chain(), initialize_cc_devstate_map_helper(), initialize_cc_max_requests(), internal_aco_type_find(), load_config(), load_config_meetme(), load_indications(), load_module(), load_mysql_config(), load_realtime_musiconhold(), load_realtime_queues(), load_realtime_rules(), load_tech_calendars(), load_users(), loader_config_init(), make_email_file(), mbl_load_adapter(), mbl_load_device(), message_range_and_existence_check(), named_acl_find_realtime(), notify_new_message(), odbc_load_module(), parse_config(), pbx_load_config(), pbx_load_users(), play_message(), prep_email_sub_vars(), private_enum_init(), process_my_load_module(), queue_rules_set_global_params(), queue_set_global_params(), read_password_from_file(), realtime_directory(), realtime_switch_common(), reload(), reload_config(), reload_followme(), reload_single_queue(), rt_handle_member_record(), rtp_reload(), search_directory(), search_directory_sub(), set_config(), set_member_value(), setup_dahdi_int(), sla_build_station(), sla_build_trunk(), sla_load_config(), tds_load_module(), vm_change_password(), vm_forwardoptions(), vm_msg_forward(), vm_msg_play(), and vm_msg_snapshot_create().
const char * ast_variable_retrieve_filtered | ( | struct ast_config * | config, |
const char * | category, | ||
const char * | variable, | ||
const char * | filter | ||
) |
Gets a variable by context and variable names.
config | which (opened) config to use |
category | category under which the variable lies |
variable | which variable you wish to get the data for |
filter | an optional comma-separated list of <name_regex>=<value_regex> pairs. Only categories with matching variables will be searched. The special name 'TEMPLATES' can be used with the special values 'include' or 'restrict' to include templates in the result or restrict the result to only templates. |
The | variable value on success |
NULL | if unable to find it. |
Definition at line 817 of file main/config.c.
References ast_category_browse_filtered(), ast_variable_find(), config, filter(), NULL, and value.
int ast_variable_update | ( | struct ast_category * | category, |
const char * | variable, | ||
const char * | value, | ||
const char * | match, | ||
unsigned int | object | ||
) |
Update variable value within a config.
category | Category element within the config |
variable | Name of the variable to change |
value | New value of the variable |
match | If set, previous value of the variable (if NULL or zero-length, no matching will be done) |
object | Boolean of whether to make the new variable an object |
Definition at line 1542 of file main/config.c.
References ast_strlen_zero(), ast_variable_destroy(), ast_variable_move(), ast_variable_new, ast_variable::file, ast_category::last, match(), ast_variable::name, ast_variable::next, ast_category::next, NULL, ast_category::prev, ast_category::root, ast_variable::value, and value.
Referenced by handle_updates(), process_text_line(), vm_change_password(), and vm_forwardoptions().
void ast_variables_destroy | ( | struct ast_variable * | var | ) |
Free variable list.
var | the linked list of variables to free |
This function frees a list of variables.
Definition at line 590 of file main/config.c.
References ast_variable_destroy(), free(), ast_variable::next, and var.
Referenced by __init_manager(), aco_set_defaults(), action_messagesend(), action_originate(), add_message_id(), aeap_cli_show(), announce_to_dial(), app_notify(), ast_aeap_client_configs_get(), ast_ari_asterisk_update_object(), ast_ari_callback(), ast_ari_channels_create(), ast_ari_channels_originate(), ast_ari_channels_originate_with_id(), ast_ari_endpoints_refer(), ast_ari_endpoints_refer_to_endpoint(), ast_ari_endpoints_send_message(), ast_ari_endpoints_send_message_to_endpoint(), ast_ari_invoke(), ast_category_destroy(), ast_category_empty(), ast_destroy_realtime(), ast_geoloc_eprofile_refresh_location(), ast_geoloc_eprofile_to_uri(), ast_http_get_cookies(), ast_http_manid_from_vars(), ast_json_to_ast_variables(), ast_load_realtime(), ast_load_realtime_all(), ast_load_realtime_multientry(), ast_sip_cli_print_sorcery_objectset(), ast_sip_sorcery_object_to_ami(), ast_sorcery_changeset_create(), ast_sorcery_copy(), ast_sorcery_diff(), ast_sorcery_object_set_extended(), ast_sorcery_objectset_apply(), ast_sorcery_objectset_json_create(), ast_store_realtime(), ast_stream_free(), ast_stream_get_metadata_list(), AST_TEST_DEFINE(), ast_update2_realtime(), ast_update_realtime(), ast_var_channel_types(), ast_var_channel_types_table(), ast_variable_list_from_quoted_string(), ast_variables_dup(), auth_http_callback(), calendar_destructor(), can_reuse_registration(), check_expiration_thread(), cli_contact_get_container(), cli_realtime_load(), conf_run(), config_object_cli_show(), copy_plain_file(), create_mwi_subscriptions(), curl_header_data_free(), destroy_dahdi_pvt(), destroy_fast_originate_helper(), dup_vars(), endpoint_destructor(), external_media_audiosocket_tcp(), external_media_rtp_udp(), fields_handler(), find_conf_realtime(), find_load_queue_rt_friendly(), find_realtime(), find_user_realtime(), free_entry(), free_outgoing(), free_user(), function_realtime_read(), function_realtime_readdestroy(), generic_http_callback(), geoloc_eprofile_destructor(), geoloc_eprofile_resolve_varlist(), geoloc_eprofile_to_intermediate(), geoloc_location_destructor(), geoloc_profile_destructor(), get_multiple_fields_as_var_list(), get_object_variables(), handle_aor(), handle_auth(), handle_endpoint(), handle_export_primitives(), handle_identify(), handle_phoneprov(), handle_pjproject_show_log_mappings(), handle_registrations(), handle_showchan(), handle_uri(), http_request_headers_get(), httpd_process_request(), httpstatus_callback(), ldap_loadentry(), leave_queue(), load_realtime_musiconhold(), local_ast_moh_start(), manager_free_user(), manager_send_response(), mkintf(), notify_ami_channel_data_destroy(), notify_ami_data_destroy(), notify_ami_uri_data_destroy(), object_type_loaded_observer(), originate_exec(), pjsip_aor_function_read(), pjsip_contact_function_read(), pjsip_endpoint_function_read(), process_dahdi(), publication_resource_destroy(), pvt_destructor(), queue_function_queuegetchannel(), queue_function_queuewaitingcount(), realtime_arguments_to_fields(), realtime_arguments_to_fields2(), realtime_canmatch(), realtime_common(), realtime_exec(), realtime_exists(), realtime_ldap_base(), realtime_ldap_base_ap(), realtime_ldap_result_to_vars(), realtime_matchmore(), realtime_odbc(), realtime_peer(), realtime_user(), realtimefield_read(), return_sorcery_object(), row_to_varlist(), rt_extend_conf(), session_destructor(), sip_aor_to_ami(), socket_process_helper(), sorcery_astdb_filter_objectset(), sorcery_astdb_retrieve_fields_common(), sorcery_astdb_retrieve_id(), sorcery_astdb_retrieve_prefix(), sorcery_astdb_retrieve_regex(), sorcery_config_destructor(), sorcery_config_fields_cmp(), sorcery_function_read(), sorcery_is_criteria_met(), sorcery_memory_cache_fields_cmp(), sorcery_memory_cached_object_destructor(), sorcery_memory_fields_cmp(), sorcery_object_destructor(), sorcery_realtime_create(), sorcery_realtime_filter_objectset(), sorcery_realtime_retrieve_fields(), sorcery_realtime_retrieve_id(), sorcery_realtime_retrieve_multiple(), sorcery_realtime_retrieve_prefix(), sorcery_realtime_retrieve_regex(), sorcery_realtime_update(), speech_aeap_engine_create(), table_configs_free(), test_sorcery_object_destroy(), test_sorcery_transform(), transport_apply(), update_ldap(), user_destructor(), var_list_from_confidence(), var_list_from_loc_info(), and var_list_from_node().
struct ast_variable * ast_variables_dup | ( | struct ast_variable * | var | ) |
Duplicate variable list.
var | the linked list of variables to clone |
Definition at line 544 of file main/config.c.
References ast_variable_new, ast_variables_destroy(), NULL, tmp(), and var.
Referenced by action_originate(), ast_ari_callback(), ast_config_copy(), authenticate(), handle_registrations(), jim_handler(), jim_vl(), realtime_sorcery(), realtime_sorcery_multi(), realtime_sorcery_store(), realtime_sorcery_update(), set_var_to_vl(), and sorcery_extended_fields_handler().
int ast_variables_match | ( | const struct ast_variable * | left, |
const struct ast_variable * | right | ||
) |
Tests 2 variable values to see if they match.
left | Variable to test |
right | Variable to match against with an optional realtime-style operator in the name |
1 | matches |
0 | doesn't match |
The values of the variables are passed to ast_strings_match. If right->name is suffixed with a space and an operator, that operator is also passed to ast_strings_match.
Examples:
left->name = "id" (ignored) left->value = "abc" right->name = "id regex" (id is ignored) right->value = "a[bdef]c"
will result in ast_strings_match("abc", "regex", "a[bdef]c") which will return 1.
left->name = "id" (ignored) left->value = "abc" right->name = "id" (ignored) right->value = "abc"
will result in ast_strings_match("abc", NULL, "abc") which will return 1.
See the documentation for ast_strings_match for the valid operators.
Definition at line 850 of file main/config.c.
References ast_strdupa, ast_strings_match(), ast_variable::name, NULL, and ast_variable::value.
Referenced by ast_variable_lists_match().
struct ast_variable * ast_variables_reverse | ( | struct ast_variable * | var | ) |
Reverse a variable list.
var | the linked list of variables to reverse |
Definition at line 566 of file main/config.c.
References ast_variable::next, NULL, and var.
Referenced by astman_get_variables_order().
|
static |
Definition at line 1098 of file main/config.c.
References config, does_category_match(), filter(), ast_category::name, ast_category::next, and NULL.
Referenced by ast_category_get(), and process_text_line().
|
static |
Definition at line 130 of file main/config.c.
References ast_str_append(), and str.
Referenced by config_text_file_load().
|
static |
Definition at line 135 of file main/config.c.
References ast_alloca, ast_str_append(), len(), and str.
Referenced by config_text_file_load().
Definition at line 144 of file main/config.c.
References ast_str_reset().
Referenced by config_text_file_load(), and process_text_line().
|
static |
Definition at line 1720 of file main/config.c.
References cfmstat_save(), cache_file_mtime::stat_mtime, cache_file_mtime::stat_mtime_nsec, and cache_file_mtime::stat_size.
Referenced by config_text_file_load().
|
static |
Definition at line 1696 of file main/config.c.
References cache_file_mtime::stat_mtime, cache_file_mtime::stat_mtime_nsec, and cache_file_mtime::stat_size.
Referenced by cfmstat_cmp(), and config_text_file_load().
|
static |
Definition at line 1666 of file main/config.c.
References ast_calloc, cache_file_mtime::filename, NULL, and cache_file_mtime::who_asked.
Referenced by config_cache_attribute(), and config_text_file_load().
|
static |
Definition at line 3041 of file main/config.c.
References ast_free, config_maps, and ast_config_map::next.
Referenced by config_shutdown(), and reload_module().
|
static |
Definition at line 1786 of file main/config.c.
References ast_calloc, AST_LIST_INSERT_SORTALPHA, AST_LIST_INSERT_TAIL, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ATTRIBUTE_EXEC, ATTRIBUTE_INCLUDE, cfmtime_new(), cache_file_mtime::filename, cache_file_mtime::has_exec, cache_file_include::include, cache_file_mtime::includes, and cache_file_mtime::who_asked.
Referenced by process_text_line().
|
static |
Definition at line 1756 of file main/config.c.
References ast_free, and config_cache_flush_includes().
Referenced by config_cache_remove(), and config_shutdown().
|
static |
Definition at line 1739 of file main/config.c.
References ast_free, AST_LIST_REMOVE_HEAD, and cache_file_mtime::includes.
Referenced by config_cache_destroy_entry(), and config_text_file_load().
|
static |
Definition at line 1769 of file main/config.c.
References AST_LIST_LOCK, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, AST_LIST_UNLOCK, config_cache_destroy_entry(), cache_file_mtime::filename, and cache_file_mtime::who_asked.
Referenced by config_text_file_load().
|
static |
Definition at line 4298 of file main/config.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_config_copy(), cfg_hooks, copy(), cfg_hook::filename, cfg_hook::hook_cb, and cfg_hook::module.
Referenced by ast_config_internal_load(), and ast_config_text_file_save2().
|
static |
Definition at line 4233 of file main/config.c.
References ao2_cleanup, ARRAY_LEN, ast_cli_unregister_multiple(), AST_LIST_LOCK, AST_LIST_REMOVE_HEAD, AST_LIST_UNLOCK, cfg_hooks, clear_config_maps(), cli_config, config_cache_destroy_entry(), and NULL.
Referenced by register_config_cli().
|
static |
Growable string buffer
< this will be a comment collector.
< A buffer for stuff behind the ;
Definition at line 2227 of file main/config.c.
References ALLOC_COMMENT(), ast_clear_flag, ast_config_AST_CONFIG_DIR, ast_config_get_current_category(), ast_copy_string(), ast_debug, ast_free, AST_LIST_INSERT_SORTALPHA, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_log, ast_str_buffer(), ast_str_create, ast_str_reset(), ast_str_strlen(), ast_strip(), ast_strlen_zero(), ast_test_flag, ast_verb, buf, CB_ADD(), CB_ADD_LEN(), CB_RESET(), CB_SIZE, cfmstat_cmp(), cfmstat_save(), cfmtime_new(), comment, comment_buffer, COMMENT_META, COMMENT_TAG, config_cache_flush_includes(), config_cache_remove(), CONFIG_FLAG_FILEUNCHANGED, CONFIG_FLAG_NOCACHE, CONFIG_FLAG_WITHCOMMENTS, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEUNCHANGED, config_text_file_load(), errno, cache_file_mtime::filename, GLOB_ABORTED, cache_file_mtime::has_exec, cache_file_include::include, cache_file_mtime::includes, ast_category::lineno, lline_buffer, LOG_ERROR, LOG_WARNING, MAX_NESTED_COMMENTS, MY_GLOB_FLAGS, NULL, process_text_line(), ast_variable::trailing, ast_category::trailing, UTF8_BOM, and cache_file_mtime::who_asked.
Referenced by config_text_file_load().
|
static |
Definition at line 2657 of file main/config.c.
References str.
Referenced by count_linefeeds_in_comments().
|
static |
Definition at line 2669 of file main/config.c.
References ast_comment::cmt, count_linefeeds(), and ast_comment::next.
Referenced by insert_leading_blank_lines().
|
static |
Returns true if ALL of the regex expressions and category name match. Both can be NULL (I.E. no predicate) which results in a true return;.
Definition at line 979 of file main/config.c.
References ast_alloca, ast_log, ast_strdupa, ast_strlen_zero(), ast_strsep(), AST_STRSEP_STRIP, ast_category::ignored, LOG_ERROR, match(), ast_variable::name, ast_category::name, ast_variable::next, NULL, ast_category::root, and ast_variable::value.
Referenced by category_get_sep(), and next_available_category().
|
static |
Find realtime engine for realtime family.
Definition at line 3224 of file main/config.c.
References ast_copy_string(), ast_log, config_engine_list, config_lock, config_maps, ast_config_map::database, ast_config_map::driver, lock, LOG_WARNING, ast_config_map::name, ast_config_engine::next, ast_config_map::next, NULL, priority, ast_config_map::priority, SCOPED_MUTEX, table, and ast_config_map::table.
Referenced by ast_check_realtime(), ast_config_internal_load(), ast_destroy_realtime_fields(), ast_load_realtime_all_fields(), ast_load_realtime_multientry_fields(), ast_realtime_require_field(), ast_store_realtime_fields(), ast_unload_realtime(), ast_update2_realtime_fields(), and ast_update_realtime_fields().
|
static |
Definition at line 2584 of file main/config.c.
References ast_copy_string().
Referenced by ast_config_text_file_save2().
|
static |
Definition at line 4203 of file main/config.c.
References a, ast_cli(), AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, cache_file_mtime::filename, NULL, S_OR, ast_cli_entry::usage, and cache_file_mtime::who_asked.
|
static |
Definition at line 4140 of file main/config.c.
References a, ast_alloca, ast_cli_completion_add(), AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_strdup, ast_strlen_zero(), buf, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, cache_file_mtime::filename, NULL, ast_category::prev, ast_cli_entry::usage, and cache_file_mtime::who_asked.
|
static |
Definition at line 4103 of file main/config.c.
References a, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, config_engine_list, config_lock, config_maps, ast_config_map::database, ast_config_map::driver, lock, ast_config_engine::name, ast_config_map::name, ast_config_engine::next, ast_config_map::next, NULL, SCOPED_MUTEX, ast_config_map::table, and ast_cli_entry::usage.
|
static |
Definition at line 1844 of file main/config.c.
References ast_log, ast_replace_sigchld(), ast_unreplace_sigchld(), buf, errno, LOG_ERROR, LOG_WARNING, status, WEXITSTATUS, and WIFEXITED.
Referenced by process_text_line().
|
static |
Definition at line 174 of file main/config.c.
References str, tmp(), and total.
Referenced by ast_config_text_file_save2().
|
static |
Definition at line 194 of file main/config.c.
References a, b, be, CMP_MATCH, CMP_STOP, and inclfile::fname.
Referenced by ast_config_text_file_save2().
|
static |
Definition at line 4274 of file main/config.c.
References CMP_MATCH, CMP_STOP, and cfg_hook::name.
Referenced by ast_config_hook_register().
|
static |
Definition at line 4266 of file main/config.c.
References ast_free, cfg_hook::filename, cfg_hook::module, and cfg_hook::name.
Referenced by ast_config_hook_register().
|
static |
Definition at line 4282 of file main/config.c.
References ast_str_hash(), and cfg_hook::name.
Referenced by ast_config_hook_register().
|
static |
Definition at line 2603 of file main/config.c.
References ast_free, and inclfile::fname.
Referenced by set_fn().
|
static |
Definition at line 118 of file main/config.c.
References ast_str_create, and str.
|
static |
Definition at line 2680 of file main/config.c.
References count_linefeeds_in_comments(), inclfile::lineno, ast_category::lineno, and ast_category::precomments.
Referenced by ast_config_text_file_save2().
|
static |
Definition at line 2721 of file main/config.c.
References ast_log, ast_strdupa, errno, and LOG_ERROR.
Referenced by ast_config_text_file_save2().
|
static |
Definition at line 4351 of file main/config.c.
References AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_SUCCESS, ast_opt_console, ast_verb, and reload_module().
|
static |
Definition at line 2610 of file main/config.c.
References ast_config_AST_CONFIG_DIR, ast_copy_string(), ast_strlen_zero(), and make_ari_stubs::file.
Referenced by ast_config_text_file_save2(), and set_fn().
|
static |
Definition at line 967 of file main/config.c.
References ast_variable_append(), NULL, ast_category::root, and var.
Referenced by process_text_line().
|
static |
Definition at line 1069 of file main/config.c.
References ast_calloc, ast_category_destroy(), ast_copy_string(), ast_strdup, ast_category::file, ast_category::ignored, ast_category::lineno, ast_category::name, name, and NULL.
Referenced by ast_category_new(), and ast_category_new_template().
|
static |
Definition at line 1246 of file main/config.c.
References does_category_match(), filter(), name, and ast_category::next.
Referenced by ast_category_browse(), and ast_category_browse_filtered().
|
static |
parse one line in the configuration.
* We can have a category header [foo](...) * a directive #include / #exec * or a regular line name = value *
Definition at line 1930 of file main/config.c.
References ALLOC_COMMENT(), appendbuf, ast_category_append(), ast_category_destroy(), ast_category_first(), ast_category_inherit(), ast_category_new(), ast_config_internal_load(), ast_config_set_current_category(), ast_include_new(), ast_log, ast_opt_exec_includes, ast_skip_blanks(), ast_str_append(), ast_str_buffer(), ast_str_set(), ast_str_trim_blanks(), ast_strip(), ast_strlen_zero(), ast_test_flag, ast_threadstorage_get(), ast_tvnow(), ast_variable_append(), ast_variable_new, ast_variable_update(), ATTRIBUTE_EXEC, ATTRIBUTE_INCLUDE, ast_variable::blanklines, buf, c, category_get_sep(), CB_RESET(), comment_buffer, config_cache_attribute(), CONFIG_FLAG_NOCACHE, CONFIG_FLAG_WITHCOMMENTS, filter(), handle_include_exec(), ast_category::ignored, ast_config::include_level, ast_variable::lineno, ast_category::lineno, lline_buffer, LOG_ERROR, LOG_WARNING, move_variables(), NULL, ast_variable::object, ast_variable::precomments, ast_category::precomments, replace(), S_OR, ast_variable::sameline, ast_category::sameline, str, strsep(), astconfigparser::try_include(), and var.
Referenced by config_text_file_load().
|
static |
Definition at line 3367 of file main/config.c.
References ast_variable_new, ast_variables_destroy(), first, sla_ringing_trunk::next, ast_variable::next, NULL, and result.
Referenced by ast_update2_realtime().
int register_config_cli | ( | void | ) |
Exposed initialization method for core process.
This method is intended for use only with the core initialization and is not designed to be called from any user applications.
Definition at line 4251 of file main/config.c.
References ARRAY_LEN, ast_cli_register_multiple, ast_register_cleanup(), cli_config, and config_shutdown().
Referenced by asterisk_daemon().
|
static |
Definition at line 3091 of file main/config.c.
References ast_config_destroy(), ast_config_internal_load(), ast_config_new(), ast_copy_string(), ast_log, ast_realtime_append_mapping(), ast_variable_browse(), buf, clear_config_maps(), config, CONFIG_FLAG_NOREALTIME, config_lock, CONFIG_STATUS_FILEINVALID, extconfig_conf, lock, LOG_ERROR, LOG_WARNING, ast_variable::name, ast_variable::next, SCOPED_MUTEX, strsep(), table, tmp(), and ast_variable::value.
Referenced by load_module().
|
static |
Definition at line 2625 of file main/config.c.
References ao2_alloc, ao2_find, ao2_link, ao2_ref, ast_strdup, make_ari_stubs::file, inclfile::fname, inclfile_destroy(), inclfile::lineno, make_fn(), NULL, and OBJ_POINTER.
Referenced by ast_config_text_file_save2().
|
static |
Definition at line 4346 of file main/config.c.
|
static |
Definition at line 953 of file main/config.c.
References ast_variable_new, ast_variable::blanklines, ast_variable::file, ast_variable::lineno, ast_variable::name, ast_variable::object, and ast_variable::value.
Referenced by ast_category_inherit().
|
inlinestatic |
Definition at line 614 of file main/config.c.
References ast_variable::next.
Referenced by ast_variable_list_sort().
|
static |
Definition at line 4367 of file main/config.c.
|
static |
Definition at line 125 of file main/config.c.
Referenced by process_text_line().
|
static |
Definition at line 4367 of file main/config.c.
|
static |
Definition at line 78 of file main/config.c.
Referenced by ast_config_hook_register(), ast_config_hook_unregister(), config_hook_exec(), and config_shutdown().
|
static |
|
static |
Definition at line 4227 of file main/config.c.
Referenced by config_shutdown(), and register_config_cli().
|
static |
Definition at line 216 of file main/config.c.
Referenced by ast_config_engine_deregister(), ast_config_engine_register(), ast_config_internal_load(), find_engine(), and handle_cli_core_show_config_mappings().
|
static |
Definition at line 215 of file main/config.c.
Referenced by ast_config_engine_deregister(), ast_config_engine_register(), ast_realtime_is_mapping_defined(), find_engine(), handle_cli_core_show_config_mappings(), and reload_module().
|
static |
|
static |
Definition at line 76 of file main/config.c.
Referenced by reload_module().
|
static |
Definition at line 3256 of file main/config.c.
Referenced by ast_config_internal_load().