From 0a8518b7c882ee0c0e954fac34fb488d42a9fc00 Mon Sep 17 00:00:00 2001 From: rizzo Date: Thu, 20 Dec 2007 09:55:05 +0000 Subject: modify http://svn.digium.com/view/asterisk?view=rev&rev=93603 so that paths and filename are writable by asterisk.c without causing segfaults. This involves defining the variables as const char *, and having them point to as static, writable buffer defined in asterisk.c On passing, fix some errors in using these variables in some files in utils/ , and in res/snmp/agent.c which was redefining a variable without using paths.h (not applicable to 1.4) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94168 f38db490-d61c-443f-a65b-d21fe96a405b --- utils/conf2ael.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'utils/conf2ael.c') diff --git a/utils/conf2ael.c b/utils/conf2ael.c index b8cae75ec..fbb8aa3b6 100644 --- a/utils/conf2ael.c +++ b/utils/conf2ael.c @@ -29,19 +29,13 @@ #include "asterisk.h" ASTERISK_FILE_VERSION(__FILE__, "$Revision$") -#include -#include -#include -#include -#include +#include "asterisk/paths.h" /* CONFIG_DIR */ #include #include #if !defined(SOLARIS) && !defined(__CYGWIN__) #include #endif -#include #include -#include #include "asterisk.h" #include "asterisk/pbx.h" @@ -59,11 +53,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/pval.h" #include "asterisk/extconf.h" +const char *ast_config_AST_CONFIG_DIR = "/etc/asterisk"; /* placeholder */ + void get_start_stop(unsigned int *word, int bitsperword, int totalbits, int *start, int *end); int all_bits_set(unsigned int *word, int bitsperword, int totalbits); extern char *days[]; extern char *months[]; -const char ast_config_AST_CONFIG_DIR[PATH_MAX]; char *config = "extensions.conf"; -- cgit v1.2.3