]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_ooh323: fix h323_log full path name
authorAlexandr Anikin <may@telecom-service.ru>
Mon, 19 May 2014 13:46:37 +0000 (13:46 +0000)
committerAlexandr Anikin <may@telecom-service.ru>
Mon, 19 May 2014 13:46:37 +0000 (13:46 +0000)
* fix to use astlogdir option for h323_log file instead of hardcoded

ASTERISK-23754 #close

Reported by: Igor Goncharovsky
Patches:
ooh323_logger_patch.diff
........

Merged revisions 414152 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 414153 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414154 65c4cc65-6c06-0410-ace0-fbb531ad65f3

addons/chan_ooh323.c

index 1f5e182c15fd21d3c325215892c39e73c7685163..a7f38bdf40a1ae7cf8526d47321cf8c2657736b9 100644 (file)
@@ -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 */
@@ -2774,7 +2775,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);