openbsd-ports/telephony/asterisk/patches/patch-main_asterisk_c

20 lines
978 B
Plaintext

$OpenBSD: patch-main_asterisk_c,v 1.8 2008/10/07 09:57:52 sthen Exp $
--- main/asterisk.c.orig Sat Jul 26 16:31:21 2008
+++ main/asterisk.c Thu Oct 2 22:51:06 2008
@@ -2486,6 +2486,7 @@ static void ast_readconfig(void)
snprintf(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(ast_config_AST_VAR_DIR, v->value, sizeof(ast_config_AST_VAR_DIR));
+ } else if (!strcasecmp(v->name, "astdbdir")) {
snprintf(ast_config_AST_DB, sizeof(ast_config_AST_DB), "%s/astdb", v->value);
} else if (!strcasecmp(v->name, "astdatadir")) {
ast_copy_string(ast_config_AST_DATA_DIR, v->value, sizeof(ast_config_AST_DATA_DIR));
@@ -2797,6 +2798,7 @@ int main(int argc, char *argv[])
rungroup = ast_config_AST_RUN_GROUP;
if ((!runuser) && !ast_strlen_zero(ast_config_AST_RUN_USER))
runuser = ast_config_AST_RUN_USER;
+ chdir("/tmp");
#ifndef __CYGWIN__