mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-29 18:19:30 +00:00
These changes are in regards to bug 13249, where users are being surprised by the changes made
to the Set app in trunk/1.6.x, as they come from the 1.4 world. They are only bitten if they write their AEL dialplan in the 1.4 world, and then carry it over to a trunk/1.6.x installation where a "make samples" was executed, or where they hand-edited the asterisk.conf file and added the [compat] category with app_set = 1.6 (or higher). (this commit does not totally solve 13249, at least not yet) The change involves issueing a single warning while the AEL file is loading, if: 1. app_set is present in the config file, and set to 1.6 or higher. 2. there are double quotes in an assignment statement (eg x = "hi there";) 3. the warning was not already issued. The standalone app, aelparse, does not (yet) issue this warning. I'd have to have it read in the asterisk.conf file, and that's a bit of hassle. I'll add it if users request it, tho. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@138815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -34,6 +34,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#include "asterisk/lock.h"
|
||||
#include "asterisk/hashtab.h"
|
||||
#include "asterisk/ael_structs.h"
|
||||
#include "asterisk/utils.h"
|
||||
|
||||
pval * linku1(pval *head, pval *tail);
|
||||
static void set_dads(pval *dad, pval *child_list);
|
||||
@@ -49,6 +50,7 @@ extern char *my_file;
|
||||
int ael_is_funcname(char *name);
|
||||
#endif
|
||||
static char *ael_token_subst(const char *mess);
|
||||
static int only_one_app_set_warning = 0;
|
||||
|
||||
%}
|
||||
|
||||
@@ -238,6 +240,10 @@ global_statements : { $$ = NULL; }
|
||||
|
||||
assignment : word EQ { reset_semicount(parseio->scanner); } word SEMI {
|
||||
$$ = npval2(PV_VARDEC, &@1, &@5);
|
||||
if (!ast_compat_app_set && !only_one_app_set_warning && strchr($4,'"')) {
|
||||
ast_log(LOG_NOTICE,"Note: In asterisk.conf, in the [compat] section, the app_set is set to 1.6 or greater. The Set() function no longer removes double quotes from the value. If this is a surprise to you, you can set app_set to 1.4.\n");
|
||||
only_one_app_set_warning = 1;
|
||||
}
|
||||
$$->u1.str = $1;
|
||||
$$->u2.val = $4; }
|
||||
;
|
||||
|
Reference in New Issue
Block a user