39 #include "asterisk/file.h"
86 static const char d_app[] =
"DBdel";
87 static const char dt_app[] =
"DBdeltree";
91 char *argv, *family, *keytree;
95 if (strchr(argv,
'/')) {
96 family =
strsep(&argv,
"/");
97 keytree =
strsep(&argv,
"\0");
98 if (!family || !keytree) {
99 ast_debug(1,
"Ignoring; Syntax error in argument\n");
110 ast_verb(3,
"DBdeltree: family=%s, keytree=%s\n", family, keytree);
112 ast_verb(3,
"DBdeltree: family=%s\n", family);
116 ast_verb(3,
"DBdeltree: Error deleting key from database.\n");
124 char *argv, *family, *key;
125 static int deprecation_warning = 0;
127 if (!deprecation_warning) {
128 deprecation_warning = 1;
129 ast_log(
LOG_WARNING,
"The DBdel application has been deprecated in favor of the DB_DELETE dialplan function!\n");
134 if (strchr(argv,
'/')) {
135 family =
strsep(&argv,
"/");
136 key =
strsep(&argv,
"\0");
137 if (!family || !key) {
138 ast_debug(1,
"Ignoring; Syntax error in argument\n");
141 ast_verb(3,
"DBdel: family=%s, key=%s\n", family, key);
143 ast_verb(3,
"DBdel: Error deleting key from database.\n");
145 ast_debug(1,
"Ignoring, no parameters\n");
Main Channel structure associated with a channel.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
Asterisk locking-related definitions:
Asterisk main include file. File version handling, generic pbx functions.
char * strsep(char **str, const char *delims)
static int load_module(void)
static int unload_module(void)
static const char dt_app[]
int ast_unregister_application(const char *app)
Unregister an application.
#define ast_verb(level,...)
#define ast_debug(level,...)
Log a DEBUG message.
General Asterisk PBX channel definitions.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
static const char d_app[]
Core PBX routines and definitions.
#define ast_strdupa(s)
duplicate a string in memory from the stack
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
int ast_db_del(const char *family, const char *key)
Delete entry in astdb.
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
static int deltree_exec(struct ast_channel *chan, const char *data)
Persistant data storage (akin to *doze registry)
static int del_exec(struct ast_channel *chan, const char *data)
int ast_db_deltree(const char *family, const char *keytree)
Delete one or more entries in astdb If both parameters are NULL, the entire database will be purged...
#define ast_register_application_xml(app, execute)
Register an application using XML documentation.
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.