From 0a568addd81eb9e0b3346b47ba749a14e6cdb742 Mon Sep 17 00:00:00 2001 From: tilghman Date: Tue, 3 Jun 2008 22:05:16 +0000 Subject: Move compatibility options into asterisk.conf, default them to on for upgrades, and off for new installations. This includes the translation from pipes to commas for pbx_realtime and the EXEC command for AGI, as well as the change to the Set application not to support multiple variables at once. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@120171 f38db490-d61c-443f-a65b-d21fe96a405b --- pbx/pbx_realtime.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'pbx/pbx_realtime.c') diff --git a/pbx/pbx_realtime.c b/pbx/pbx_realtime.c index 6e5a9f7e1..4fb06c867 100644 --- a/pbx/pbx_realtime.c +++ b/pbx/pbx_realtime.c @@ -53,9 +53,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #define EXT_DATA_SIZE 256 -/* If set to 0, translate commas to "\," and pipes to "," */ -static int compat16 = 1; - /* Realtime switch looks up extensions in the supplied realtime table. [context@][realtimetable][/options] @@ -179,7 +176,7 @@ static int realtime_exec(struct ast_channel *chan, const char *context, const ch if (!strcasecmp(v->name, "app")) app = ast_strdupa(v->value); else if (!strcasecmp(v->name, "appdata")) { - if (!compat16) { + if (ast_compat_pbx_realtime) { char *ptr; int in = 0; tmp = alloca(strlen(v->value) * 2 + 1); @@ -270,18 +267,6 @@ static int unload_module(void) static int load_module(void) { - struct ast_flags flags = { 0 }; - struct ast_config *cfg = ast_config_load("pbx_realtime.conf", flags); - if (cfg) { - const char *tmp = ast_variable_retrieve(cfg, "general", "compat"); - if (tmp && strncmp(tmp, "1.6", 3)) { - compat16 = 0; - } else { - compat16 = 1; - } - ast_config_destroy(cfg); - } - if (ast_register_switch(&realtime_switch)) return AST_MODULE_LOAD_FAILURE; return AST_MODULE_LOAD_SUCCESS; -- cgit v1.2.3