diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c index 8510a5cbab0c0bd4d6d916a0b7388c1371b4d2c1..0242079b8622c55a2353be9787d3e24880f32da6 100644 --- a/addons/chan_ooh323.c +++ b/addons/chan_ooh323.c @@ -23,6 +23,7 @@ ***/ #include "chan_ooh323.h" +#include "asterisk/paths.h" #include <math.h> #define FORMAT_STRING_SIZE 512 @@ -30,7 +31,7 @@ /* Defaults */ #define DEFAULT_CONTEXT "default" #define DEFAULT_H323ID "Asterisk PBX" -#define DEFAULT_LOGFILE "/var/log/asterisk/h323_log" +#define DEFAULT_LOGFILE "h323_log" #define DEFAULT_H323ACCNT "ast_h323" /* Flags */ @@ -2787,7 +2788,7 @@ int reload_config(int reload) } /* Inintialize everything to default */ - strcpy(gLogFile, DEFAULT_LOGFILE); + snprintf(gLogFile, sizeof(gLogFile), "%s/%s", ast_config_AST_LOG_DIR, DEFAULT_LOGFILE); gPort = 1720; gIP[0] = '\0'; strcpy(gCallerID, DEFAULT_H323ID);