aboutsummaryrefslogtreecommitdiffstats
path: root/asterisk.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-06-06 03:04:58 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-06-06 03:04:58 +0000
commite5006737913cf0182a428bea5fe509001aa4e98f (patch)
tree58d7e6695d5101aec3937aa27bc051e769ae3bbc /asterisk.c
parent42b7c567777aacf352bdf359cd7b27e8f1a644a9 (diff)
major Makefile and build process improvements, including removal of all hardcoded paths (modules must now use run-time paths as they should) (bug #4116)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5855 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'asterisk.c')
-rwxr-xr-xasterisk.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/asterisk.c b/asterisk.c
index 94f1f341c..1c0ba53d0 100755
--- a/asterisk.c
+++ b/asterisk.c
@@ -33,6 +33,7 @@
#include <netdb.h>
#endif
+#include "asterisk.h"
#include "asterisk/logger.h"
#include "asterisk/options.h"
#include "asterisk/cli.h"
@@ -56,8 +57,11 @@
#include "asterisk/io.h"
#include "asterisk/lock.h"
#include "editline/histedit.h"
-#include "asterisk.h"
#include "asterisk/config.h"
+#include "asterisk/version.h"
+#include "asterisk/build.h"
+
+#include "defaults.h"
#ifndef AF_LOCAL
#define AF_LOCAL AF_UNIX
@@ -128,6 +132,7 @@ char ast_config_AST_CONFIG_DIR[AST_CONFIG_MAX_PATH];
char ast_config_AST_CONFIG_FILE[AST_CONFIG_MAX_PATH];
char ast_config_AST_MODULE_DIR[AST_CONFIG_MAX_PATH];
char ast_config_AST_SPOOL_DIR[AST_CONFIG_MAX_PATH];
+char ast_config_AST_MONITOR_DIR[AST_CONFIG_MAX_PATH];
char ast_config_AST_VAR_DIR[AST_CONFIG_MAX_PATH];
char ast_config_AST_LOG_DIR[AST_CONFIG_MAX_PATH];
char ast_config_AST_AGI_DIR[AST_CONFIG_MAX_PATH];
@@ -395,7 +400,7 @@ static int ast_makesocket(void)
int x;
struct ast_config *cfg;
- char *config = ASTCONFPATH;
+ char *config = AST_CONFIG_FILE;
char *owner;
char *group;
char *perms;
@@ -1547,7 +1552,7 @@ static void ast_readconfig(void) {
struct ast_config *cfg;
struct ast_variable *v;
struct ast_variable *v_ctlfile;
- char *config = ASTCONFPATH;
+ char *config = AST_CONFIG_FILE;
if (option_overrideconfig == 1) {
cfg = ast_config_load((char *)ast_config_AST_CONFIG_FILE);
@@ -1561,6 +1566,7 @@ static void ast_readconfig(void) {
ast_copy_string((char *)ast_config_AST_CONFIG_DIR,AST_CONFIG_DIR,sizeof(ast_config_AST_CONFIG_DIR));
ast_copy_string((char *)ast_config_AST_SPOOL_DIR,AST_SPOOL_DIR,sizeof(ast_config_AST_SPOOL_DIR));
ast_copy_string((char *)ast_config_AST_MODULE_DIR,AST_MODULE_DIR,sizeof(ast_config_AST_VAR_DIR));
+ snprintf((char *)ast_config_AST_MONITOR_DIR,sizeof(ast_config_AST_MONITOR_DIR)-1,"%s/monitor",ast_config_AST_SPOOL_DIR);
ast_copy_string((char *)ast_config_AST_VAR_DIR,AST_VAR_DIR,sizeof(ast_config_AST_VAR_DIR));
ast_copy_string((char *)ast_config_AST_LOG_DIR,AST_LOG_DIR,sizeof(ast_config_AST_LOG_DIR));
ast_copy_string((char *)ast_config_AST_AGI_DIR,AST_AGI_DIR,sizeof(ast_config_AST_AGI_DIR));
@@ -1588,6 +1594,7 @@ static void ast_readconfig(void) {
ast_copy_string((char *)ast_config_AST_CONFIG_DIR,v->value,sizeof(ast_config_AST_CONFIG_DIR));
} else if (!strcasecmp(v->name, "astspooldir")) {
ast_copy_string((char *)ast_config_AST_SPOOL_DIR,v->value,sizeof(ast_config_AST_SPOOL_DIR));
+ snprintf((char *)ast_config_AST_MONITOR_DIR,sizeof(ast_config_AST_MONITOR_DIR)-1,"%s/monitor",v->value);
} else if (!strcasecmp(v->name, "astvarlibdir")) {
ast_copy_string((char *)ast_config_AST_VAR_DIR,v->value,sizeof(ast_config_AST_VAR_DIR));
snprintf((char *)ast_config_AST_DB,sizeof(ast_config_AST_DB),"%s/%s",v->value,"astdb");