aboutsummaryrefslogtreecommitdiffstats
path: root/utils/conf2ael.c
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-20 09:55:05 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-20 09:55:05 +0000
commit0a8518b7c882ee0c0e954fac34fb488d42a9fc00 (patch)
tree0d6c0aea4374306de8f0b0397b8c7138771c6870 /utils/conf2ael.c
parent832aa00d113c434ab218ae2321b88be1df51d074 (diff)
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
Diffstat (limited to 'utils/conf2ael.c')
-rw-r--r--utils/conf2ael.c11
1 files changed, 3 insertions, 8 deletions
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 <stdio.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
+#include "asterisk/paths.h" /* CONFIG_DIR */
#include <locale.h>
#include <ctype.h>
#if !defined(SOLARIS) && !defined(__CYGWIN__)
#include <err.h>
#endif
-#include <errno.h>
#include <regex.h>
-#include <limits.h>
#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";