[asterisk-commits] jpeeler: branch jpeeler/chan_dahdi r121680 - in /team/jpeeler/chan_dahdi: app...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jun 10 15:25:26 CDT 2008
Author: jpeeler
Date: Tue Jun 10 15:25:26 2008
New Revision: 121680
URL: http://svn.digium.com/view/asterisk?view=rev&rev=121680
Log:
make apps backward compatible with old zap prefixes
Modified:
team/jpeeler/chan_dahdi/apps/app_zapbarge.c
team/jpeeler/chan_dahdi/apps/app_zapras.c
team/jpeeler/chan_dahdi/apps/app_zapscan.c
team/jpeeler/chan_dahdi/channels/chan_dahdi.c
Modified: team/jpeeler/chan_dahdi/apps/app_zapbarge.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi/apps/app_zapbarge.c?view=diff&rev=121680&r1=121679&r2=121680
==============================================================================
--- team/jpeeler/chan_dahdi/apps/app_zapbarge.c (original)
+++ team/jpeeler/chan_dahdi/apps/app_zapbarge.c Tue Jun 10 15:25:26 2008
@@ -53,6 +53,7 @@
#include "asterisk/utils.h"
static char *app = "DAHDIBarge";
+static char *deprecated_app = "ZapBarge";
static char *synopsis = "Barge in (monitor) DAHDI channel";
@@ -286,6 +287,12 @@
return res;
}
+static int conf_exec_warn(struct ast_channel *chan, void *data)
+{
+ ast_log(LOG_WARNING, "Use of the command %s is deprecated, please use %s instead.\n", deprecated_app, app);
+ return conf_exec(chan, data);
+}
+
static int unload_module(void)
{
return ast_unregister_application(app);
@@ -293,6 +300,7 @@
static int load_module(void)
{
+ ast_register_application(deprecated_app, conf_exec_warn, synopsis, descrip);
return ((ast_register_application(app, conf_exec, synopsis, descrip)) ? AST_MODULE_LOAD_FAILURE : AST_MODULE_LOAD_SUCCESS);
}
Modified: team/jpeeler/chan_dahdi/apps/app_zapras.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi/apps/app_zapras.c?view=diff&rev=121680&r1=121679&r2=121680
==============================================================================
--- team/jpeeler/chan_dahdi/apps/app_zapras.c (original)
+++ team/jpeeler/chan_dahdi/apps/app_zapras.c Tue Jun 10 15:25:26 2008
@@ -53,6 +53,7 @@
#include "asterisk/app.h"
static char *app = "DAHDIRAS";
+static char *deprecated_app = "ZapRAS";
static char *synopsis = "Executes DAHDI ISDN RAS application";
@@ -211,6 +212,12 @@
return res;
}
+static int dahdiras_exec_warn(struct ast_channel *chan, void *data)
+{
+ ast_log(LOG_WARNING, "Use of the command %s is deprecated, please use %s instead.\n", deprecated_app, app);
+ return dahdiras_exec(chan, data);
+}
+
static int unload_module(void)
{
return ast_unregister_application(app);
@@ -218,6 +225,7 @@
static int load_module(void)
{
+ ast_register_application(deprecated_app, dahdiras_exec_warn, synopsis, descrip);
return ((ast_register_application(app, dahdiras_exec, synopsis, descrip)) ? AST_MODULE_LOAD_FAILURE : AST_MODULE_LOAD_SUCCESS);
}
Modified: team/jpeeler/chan_dahdi/apps/app_zapscan.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi/apps/app_zapscan.c?view=diff&rev=121680&r1=121679&r2=121680
==============================================================================
--- team/jpeeler/chan_dahdi/apps/app_zapscan.c (original)
+++ team/jpeeler/chan_dahdi/apps/app_zapscan.c Tue Jun 10 15:25:26 2008
@@ -53,6 +53,7 @@
#include "asterisk/options.h"
static char *app = "DAHDIScan";
+static char *deprecated_app = "ZapScan";
static char *synopsis = "Scan DAHDI channels to monitor calls";
@@ -356,6 +357,12 @@
return res;
}
+static int conf_exec_warn(struct ast_channel *chan, void *data)
+{
+ ast_log(LOG_WARNING, "Use of the command %s is deprecated, please use %s instead.\n", deprecated_app, app);
+ return conf_exec(chan, data);
+}
+
static int unload_module(void)
{
return ast_unregister_application(app);
@@ -363,6 +370,7 @@
static int load_module(void)
{
+ ast_register_application(deprecated_app, conf_exec_warn, synopsis, descrip);
return ((ast_register_application(app, conf_exec, synopsis, descrip)) ? AST_MODULE_LOAD_FAILURE : AST_MODULE_LOAD_SUCCESS);
}
Modified: team/jpeeler/chan_dahdi/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi/channels/chan_dahdi.c?view=diff&rev=121680&r1=121679&r2=121680
==============================================================================
--- team/jpeeler/chan_dahdi/channels/chan_dahdi.c (original)
+++ team/jpeeler/chan_dahdi/channels/chan_dahdi.c Tue Jun 10 15:25:26 2008
@@ -5387,7 +5387,7 @@
}
}
/* Ensure the CW timer decrements only on a single subchannel */
- if (p->callwaitingrepeat && zt_get_index(ast, p, 1) == SUB_REAL) {
+ if (p->callwaitingrepeat && dahdi_get_index(ast, p, 1) == SUB_REAL) {
p->callwaitingrepeat--;
}
if (p->cidcwexpire)
More information about the asterisk-commits
mailing list