Database access functions.
More...
Go to the source code of this file.
◆ __reg_module()
| static void __reg_module |
( |
void |
| ) |
|
|
static |
◆ __unreg_module()
| static void __unreg_module |
( |
void |
| ) |
|
|
static |
◆ AST_MODULE_SELF_SYM()
◆ deltree_exec()
| static int deltree_exec |
( |
struct ast_channel * |
chan, |
|
|
const char * |
data |
|
) |
| |
|
static |
Definition at line 69 of file app_db.c.
70{
71 char *argv, *family, *keytree;
72
74
75 if (strchr(argv, '/')) {
76 family =
strsep(&argv,
"/");
77 keytree =
strsep(&argv,
"\0");
78 if (!family || !keytree) {
79 ast_debug(1,
"Ignoring; Syntax error in argument\n");
80 return 0;
81 }
83 keytree = 0;
84 } else {
85 family = argv;
86 keytree = 0;
87 }
88
89 if (keytree) {
90 ast_verb(3,
"DBdeltree: family=%s, keytree=%s\n", family, keytree);
91 } else {
92 ast_verb(3,
"DBdeltree: family=%s\n", family);
93 }
94
96 ast_verb(3,
"DBdeltree: Error deleting key from database.\n");
97 }
98
99 return 0;
100}
int ast_db_deltree(const char *family, const char *keytree)
Delete one or more entries in astdb.
char * strsep(char **str, const char *delims)
#define ast_strdupa(s)
duplicate a string in memory from the stack
#define ast_debug(level,...)
Log a DEBUG message.
#define ast_verb(level,...)
static force_inline int attribute_pure ast_strlen_zero(const char *s)
References ast_db_deltree(), ast_debug, ast_strdupa, ast_strlen_zero(), ast_verb, and strsep().
Referenced by load_module().
◆ load_module()
| static int load_module |
( |
void |
| ) |
|
|
static |
Definition at line 107 of file app_db.c.
108{
110}
static const char dt_app[]
static int deltree_exec(struct ast_channel *chan, const char *data)
#define ast_register_application_xml(app, execute)
Register an application using XML documentation.
References ast_register_application_xml, deltree_exec(), and dt_app.
◆ unload_module()
| static int unload_module |
( |
void |
| ) |
|
|
static |
◆ __mod_info
◆ ast_module_info
◆ dt_app
| const char dt_app[] = "DBdeltree" |
|
static |