From ffb5f5930618b82fe5c7d3a3d0f8a9a05075960c Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 25 Jan 2014 22:47:57 +0100 Subject: [PATCH] Fix Vivox logging that got broken by LL and delete log files only if debugging is disabled --- indra/newview/llappviewer.cpp | 3 --- indra/newview/llvoicevivox.cpp | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e8fd8f228a..6c25ba1a4b 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -787,9 +787,6 @@ LLAppViewer::~LLAppViewer() destroyMainloopTimeout(); - // Delete useless Vivox logs on logout - gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, ""), "VivoxVoiceService-*.log"); - // If we got to this destructor somehow, the app didn't hang. removeMarkerFile(); } diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 8dd3f7ebb5..aeb694bc41 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -376,6 +376,13 @@ void LLVivoxVoiceClient::terminate() { killGateway(); } + + // Delete useless Vivox logs on logout + if (gSavedSettings.getString("VivoxDebugLevel") == "0") + { + gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, ""), "VivoxVoiceService-*.log"); + } + // } //--------------------------------------------------- @@ -467,11 +474,17 @@ void LLVivoxVoiceClient::connectorCreate() setState(stateConnectorStarting); std::string savedLogLevel = gSavedSettings.getString("VivoxDebugLevel"); - - if(savedLogLevel != "-0") + + // Fixing Vivox debug level + //if(savedLogLevel != "-0") + if(savedLogLevel != "0") + // { LL_DEBUGS("Voice") << "creating connector with logging enabled" << LL_ENDL; + // Fixing Vivox debug level loglevel = "0"; + loglevel = "10"; + // } stream