aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/paths.h
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-18 10:24:58 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-18 10:24:58 +0000
commit553ab5f770df03d4936de89ad33faa757a5a7151 (patch)
tree48fcbf7932507d398d956c38dbcff47370d07b05 /include/asterisk/paths.h
parent659205253cbd99d28a324c50ae111dad77b7370c (diff)
make configuration variable const so they are not accidentally
modified. This requires casting the strings in asterisk.c when writing to them, so we do it through a macro to do it consistently. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93603 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/paths.h')
-rw-r--r--include/asterisk/paths.h46
1 files changed, 25 insertions, 21 deletions
diff --git a/include/asterisk/paths.h b/include/asterisk/paths.h
index f539c078e..7c5f5aa65 100644
--- a/include/asterisk/paths.h
+++ b/include/asterisk/paths.h
@@ -17,27 +17,31 @@
#ifndef _ASTERISK_PATHS_H
#define _ASTERISK_PATHS_H
+#
+extern const char ast_config_AST_CONFIG_DIR[PATH_MAX];
+extern const char ast_config_AST_CONFIG_FILE[PATH_MAX];
+extern const char ast_config_AST_MODULE_DIR[PATH_MAX];
+extern const char ast_config_AST_SPOOL_DIR[PATH_MAX];
+extern const char ast_config_AST_MONITOR_DIR[PATH_MAX];
+extern const char ast_config_AST_VAR_DIR[PATH_MAX];
+extern const char ast_config_AST_DATA_DIR[PATH_MAX];
+extern const char ast_config_AST_LOG_DIR[PATH_MAX];
+extern const char ast_config_AST_AGI_DIR[PATH_MAX];
+extern const char ast_config_AST_DB[PATH_MAX];
+extern const char ast_config_AST_KEY_DIR[PATH_MAX];
+extern const char ast_config_AST_PID[PATH_MAX];
+extern const char ast_config_AST_SOCKET[PATH_MAX];
+extern const char ast_config_AST_RUN_DIR[PATH_MAX];
+extern const char ast_config_AST_RUN_GROUP[PATH_MAX];
+extern const char ast_config_AST_RUN_USER[PATH_MAX];
+extern const char ast_config_AST_SYSTEM_NAME[20];
+
+#if 0 /* only used in main/asterisk.c */
+extern const char ast_config_AST_CTL_PERMISSIONS[PATH_MAX];
+extern const char ast_config_AST_CTL_OWNER[PATH_MAX];
+extern const char ast_config_AST_CTL_GROUP[PATH_MAX];
+extern const char ast_config_AST_CTL[PATH_MAX];
+#endif
-extern char ast_config_AST_CONFIG_DIR[PATH_MAX];
-extern char ast_config_AST_CONFIG_FILE[PATH_MAX];
-extern char ast_config_AST_MODULE_DIR[PATH_MAX];
-extern char ast_config_AST_SPOOL_DIR[PATH_MAX];
-extern char ast_config_AST_MONITOR_DIR[PATH_MAX];
-extern char ast_config_AST_VAR_DIR[PATH_MAX];
-extern char ast_config_AST_DATA_DIR[PATH_MAX];
-extern char ast_config_AST_LOG_DIR[PATH_MAX];
-extern char ast_config_AST_AGI_DIR[PATH_MAX];
-extern char ast_config_AST_DB[PATH_MAX];
-extern char ast_config_AST_KEY_DIR[PATH_MAX];
-extern char ast_config_AST_PID[PATH_MAX];
-extern char ast_config_AST_SOCKET[PATH_MAX];
-extern char ast_config_AST_RUN_DIR[PATH_MAX];
-extern char ast_config_AST_RUN_GROUP[PATH_MAX];
-extern char ast_config_AST_RUN_USER[PATH_MAX];
-extern char ast_config_AST_CTL_PERMISSIONS[PATH_MAX];
-extern char ast_config_AST_CTL_OWNER[PATH_MAX];
-extern char ast_config_AST_CTL_GROUP[PATH_MAX];
-extern char ast_config_AST_CTL[PATH_MAX];
-extern char ast_config_AST_SYSTEM_NAME[20];
#endif /* _ASTERISK_PATHS_H */