From 7fa61bee7d203bd08f99d0fd60bcb1435d33aa47 Mon Sep 17 00:00:00 2001 From: Alexandr Anikin Date: Mon, 19 May 2014 13:31:43 +0000 Subject: [PATCH] chan_ooh323: fix h323_log full path name * fix to use astlogdir option for h323_log file instead of hardcoded ASTERISK-23754 #close Reported by: Igor Goncharovsky Patches: ooh323_logger_patch.diff git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@414152 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- addons/chan_ooh323.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c index 7ee70c8f68..bc4db578e6 100644 --- a/addons/chan_ooh323.c +++ b/addons/chan_ooh323.c @@ -23,6 +23,7 @@ ***/ #include "chan_ooh323.h" +#include "asterisk/paths.h" #include #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 */ @@ -2569,7 +2570,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);