diff options
Diffstat (limited to 'pbx')
-rw-r--r-- | pbx/pbx_ael.c | 14 | ||||
-rw-r--r-- | pbx/pbx_config.c | 11 |
2 files changed, 3 insertions, 22 deletions
diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c index 17bcada96..f7a5f6c54 100644 --- a/pbx/pbx_ael.c +++ b/pbx/pbx_ael.c @@ -51,16 +51,6 @@ static char expr_output[2096]; /* these functions are in ../ast_expr2.fl */ - -#ifdef __AST_DEBUG_MALLOC -static void FREE(void *ptr) -{ - free(ptr); -} -#else -#define FREE free -#endif - #define DEBUG_READ (1 << 0) #define DEBUG_TOKENS (1 << 1) #define DEBUG_MACROS (1 << 2) @@ -3403,7 +3393,7 @@ void add_extensions(struct ael_extension *exten) if (exten->hints) { if (ast_add_extension2(exten->context, 0 /*no replace*/, exten->name, PRIORITY_HINT, NULL, exten->cidmatch, - exten->hints, NULL, FREE, registrar)) { + exten->hints, NULL, ast_free, registrar)) { ast_log(LOG_WARNING, "Unable to add step at priority 'hint' of extension '%s'\n", exten->name); } @@ -3483,7 +3473,7 @@ void add_extensions(struct ael_extension *exten) label = 0; if (ast_add_extension2(exten->context, 0 /*no replace*/, exten->name, pr->priority_num, (label?label:NULL), exten->cidmatch, - app, strdup(appargs), FREE, registrar)) { + app, strdup(appargs), ast_free, registrar)) { ast_log(LOG_WARNING, "Unable to add step at priority '%d' of extension '%s'\n", pr->priority_num, exten->name); } diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c index 6b6edbc48..c74c4c105 100644 --- a/pbx/pbx_config.c +++ b/pbx/pbx_config.c @@ -42,15 +42,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/cli.h" #include "asterisk/callerid.h" -#ifdef __AST_DEBUG_MALLOC -static void FREE(void *ptr) -{ - free(ptr); -} -#else -#define FREE free -#endif - static char *config = "extensions.conf"; static char *registrar = "pbx_config"; @@ -1458,7 +1449,7 @@ static void pbx_load_config(const char *config_file) lastpri = ipri; if (!ast_opt_dont_warn && !strcmp(realext, "_.")) ast_log(LOG_WARNING, "The use of '_.' for an extension is strongly discouraged and can have unexpected behavior. Please use '_X.' instead at line %d\n", v->lineno); - if (ast_add_extension2(con, 0, realext, ipri, label, cidmatch, appl, strdup(data), FREE, registrar)) { + if (ast_add_extension2(con, 0, realext, ipri, label, cidmatch, appl, strdup(data), ast_free, registrar)) { ast_log(LOG_WARNING, "Unable to register extension at line %d\n", v->lineno); } } |