From ad3a60beee501f9e89a539035fb3ff07d6a2e5cd Mon Sep 17 00:00:00 2001 From: Gerald Begumisa Date: Tue, 7 Aug 2007 15:33:44 +0000 Subject: Changed ORKAUDIO_LOGGING_PATH to be default AudioOutputPath, if AudioOutputPath is not specified in the configuration file git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@461 09dcff7a-b715-0410-9601-b79a96267cd0 --- orkbasecxx/Config.cpp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'orkbasecxx/Config.cpp') diff --git a/orkbasecxx/Config.cpp b/orkbasecxx/Config.cpp index fa0ed42..75f36f7 100644 --- a/orkbasecxx/Config.cpp +++ b/orkbasecxx/Config.cpp @@ -88,22 +88,21 @@ void Config::Define(Serializer* s) s->IntValue(REPORTING_RETRY_DELAY_PARAM, m_reportingRetryDelay); s->IntValue(CLIENT_TIMEOUT_PARAM, m_clientTimeout); - char *loggingPath = NULL; - int pathSet = 0; - - loggingPath = ACE_OS::getenv("ORKAUDIO_LOGGING_PATH"); - if(loggingPath) { - ACE_DIR* dir = ACE_OS::opendir(loggingPath); - if(dir) { - ACE_OS::closedir(dir); - m_audioOutputPath.Format("%s", loggingPath); - pathSet = 1; - } + s->StringValue(AUDIO_OUTPUT_PATH_PARAM, m_audioOutputPath); + + if(!m_audioOutputPath.size()) { + char *loggingPath = NULL; + + loggingPath = ACE_OS::getenv("ORKAUDIO_LOGGING_PATH"); + if(loggingPath) { + ACE_DIR* dir = ACE_OS::opendir(loggingPath); + if(dir) { + ACE_OS::closedir(dir); + m_audioOutputPath.Format("%s", loggingPath); + } + } } - if(!pathSet) - s->StringValue(AUDIO_OUTPUT_PATH_PARAM, m_audioOutputPath); - s->IntValue(IMMEDIATE_PROCESSING_QUEUE_SIZE_PARAM, m_immediateProcessingQueueSize); s->IntValue(BATCH_PROCESSING_QUEUE_SIZE_PARAM, m_batchProcessingQueueSize); s->BoolValue(BATCH_PROCESSING_ENHANCE_PRIORITY_PARAM, m_batchProcessingEnhancePriority); -- cgit v1.2.3