mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
module: Remove deprecated modules and update support levels.
I have removed the STATIC_BUILD option immediately as it has not been maintained in many years and is non-functional. ASTERISK-27965 Change-Id: I64783d017b86dba9ee3c7bcfb97e59889a3f76d7
This commit is contained in:
@@ -42,25 +42,6 @@
|
||||
#include "asterisk/lock.h"
|
||||
|
||||
/*** DOCUMENTATION
|
||||
<application name="DBdel" language="en_US">
|
||||
<synopsis>
|
||||
Delete a key from the asterisk database.
|
||||
</synopsis>
|
||||
<syntax argsep="/">
|
||||
<parameter name="family" required="true" />
|
||||
<parameter name="key" required="true" />
|
||||
</syntax>
|
||||
<description>
|
||||
<para>This application will delete a <replaceable>key</replaceable> from the Asterisk
|
||||
database.</para>
|
||||
<note><para>This application has been DEPRECATED in favor of the DB_DELETE function.</para></note>
|
||||
</description>
|
||||
<see-also>
|
||||
<ref type="function">DB_DELETE</ref>
|
||||
<ref type="application">DBdeltree</ref>
|
||||
<ref type="function">DB</ref>
|
||||
</see-also>
|
||||
</application>
|
||||
<application name="DBdeltree" language="en_US">
|
||||
<synopsis>
|
||||
Delete a family or keytree from the asterisk database.
|
||||
@@ -75,13 +56,11 @@
|
||||
</description>
|
||||
<see-also>
|
||||
<ref type="function">DB_DELETE</ref>
|
||||
<ref type="application">DBdel</ref>
|
||||
<ref type="function">DB</ref>
|
||||
</see-also>
|
||||
</application>
|
||||
***/
|
||||
|
||||
static const char d_app[] = "DBdel";
|
||||
static const char dt_app[] = "DBdeltree";
|
||||
|
||||
static int deltree_exec(struct ast_channel *chan, const char *data)
|
||||
@@ -117,53 +96,14 @@ static int deltree_exec(struct ast_channel *chan, const char *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int del_exec(struct ast_channel *chan, const char *data)
|
||||
{
|
||||
char *argv, *family, *key;
|
||||
static int deprecation_warning = 0;
|
||||
|
||||
if (!deprecation_warning) {
|
||||
deprecation_warning = 1;
|
||||
ast_log(LOG_WARNING, "The DBdel application has been deprecated in favor of the DB_DELETE dialplan function!\n");
|
||||
}
|
||||
|
||||
argv = ast_strdupa(data);
|
||||
|
||||
if (strchr(argv, '/')) {
|
||||
family = strsep(&argv, "/");
|
||||
key = strsep(&argv, "\0");
|
||||
if (!family || !key) {
|
||||
ast_debug(1, "Ignoring; Syntax error in argument\n");
|
||||
return 0;
|
||||
}
|
||||
ast_verb(3, "DBdel: family=%s, key=%s\n", family, key);
|
||||
if (ast_db_del(family, key))
|
||||
ast_verb(3, "DBdel: Error deleting key from database.\n");
|
||||
} else {
|
||||
ast_debug(1, "Ignoring, no parameters\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int unload_module(void)
|
||||
{
|
||||
int retval;
|
||||
|
||||
retval = ast_unregister_application(dt_app);
|
||||
retval |= ast_unregister_application(d_app);
|
||||
|
||||
return retval;
|
||||
return ast_unregister_application(dt_app);
|
||||
}
|
||||
|
||||
static int load_module(void)
|
||||
{
|
||||
int retval;
|
||||
|
||||
retval = ast_register_application_xml(d_app, del_exec);
|
||||
retval |= ast_register_application_xml(dt_app, deltree_exec);
|
||||
|
||||
return retval;
|
||||
return ast_register_application_xml(dt_app, deltree_exec);
|
||||
}
|
||||
|
||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Database Access Functions");
|
||||
|
||||
Reference in New Issue
Block a user