[svn-commits] jpeeler: branch jpeeler/chan_dahdi14 r119460 - /team/jpeeler/chan_dahdi14/pbx/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri May 30 17:44:30 CDT 2008


Author: jpeeler
Date: Fri May 30 17:44:29 2008
New Revision: 119460

URL: http://svn.digium.com/view/asterisk?view=rev&rev=119460
Log:
add dahdichan item to users.conf with fallback to deprecated zapchan

Modified:
    team/jpeeler/chan_dahdi14/pbx/pbx_config.c

Modified: team/jpeeler/chan_dahdi14/pbx/pbx_config.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/chan_dahdi14/pbx/pbx_config.c?view=diff&rev=119460&r1=119459&r2=119460
==============================================================================
--- team/jpeeler/chan_dahdi14/pbx/pbx_config.c (original)
+++ team/jpeeler/chan_dahdi14/pbx/pbx_config.c Fri May 30 17:44:29 2008
@@ -2357,7 +2357,7 @@
 {
 	struct ast_config *cfg;
 	char *cat, *chan;
-	const char *zapchan;
+	const char *dahdichan;
 	const char *hasexten;
 	char tmp[256];
 	char iface[256];
@@ -2393,9 +2393,19 @@
 		if (hasexten && !ast_true(hasexten))
 			continue;
 		hasvoicemail = ast_true(ast_config_option(cfg, cat, "hasvoicemail"));
-		zapchan = ast_variable_retrieve(cfg, cat, "zapchan");
-		if (!zapchan)
-			zapchan = ast_variable_retrieve(cfg, "general", "zapchan");
+		dahdichan = ast_variable_retrieve(cfg, cat, "dahdichan");
+		if (!dahdichan)
+			dahdichan = ast_variable_retrieve(cfg, "general", "dahdichan");
+		if (!dahdichan) {
+		/* no dahdichan, but look for zapchan too */
+			dahdichan = ast_variable_retrieve(cfg, cat, "zapchan");
+			if (!dahdichan) {
+				dahdichan = ast_variable_retrieve(cfg, "general", "zapchan");
+			}
+			if (!ast_strlen_zero(dahdichan)) {
+				ast_log(LOG_WARNING, "Use of zapchan in users.conf is deprecated. Please update configuration to use dahdichan instead.\n");
+			}
+		}
 		if (!ast_strlen_zero(zapchan)) {
 			ast_copy_string(zapcopy, zapchan, sizeof(zapcopy));
 			c = zapcopy;




More information about the svn-commits mailing list