summaryrefslogtreecommitdiff
path: root/indra/newview/llsechandler_basic.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2015-04-02 21:21:21 -0400
committerOz Linden <oz@lindenlab.com>2015-04-02 21:21:21 -0400
commit4aafdfd1c6ee76484b83a4e91a73af357aba0de7 (patch)
tree5027617bc10501a5dca205d3dd6b069e9238b0cd /indra/newview/llsechandler_basic.cpp
parente19809cb916df8b2ba965662607abe604d7a2bf5 (diff)
add catch for possible exception in llsechandler_basic destructor (crash on exit)
Diffstat (limited to 'indra/newview/llsechandler_basic.cpp')
-rwxr-xr-xindra/newview/llsechandler_basic.cpp32
1 files changed, 24 insertions, 8 deletions
diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp
index fc9d9f0842..588c585f52 100755
--- a/indra/newview/llsechandler_basic.cpp
+++ b/indra/newview/llsechandler_basic.cpp
@@ -1364,6 +1364,7 @@ void LLSecAPIBasicHandler::_writeProtectedData()
}
catch (...)
{
+ LL_WARNS() << "LLProtectedDataException(Error writing Protected Data Store)" << LL_ENDL;
// it's good practice to clean up any secure information on error
// (even though this file isn't really secure. Perhaps in the future
// it may be, however.
@@ -1372,20 +1373,35 @@ void LLSecAPIBasicHandler::_writeProtectedData()
// EXP-1825 crash in LLSecAPIBasicHandler::_writeProtectedData()
// Decided throwing an exception here was overkill until we figure out why this happens
//throw LLProtectedDataException("Error writing Protected Data Store");
- LL_INFOS() << "LLProtectedDataException(Error writing Protected Data Store)" << LL_ENDL;
}
- // move the temporary file to the specified file location.
- if((((LLFile::isfile(mProtectedDataFilename) != 0) &&
- (LLFile::remove(mProtectedDataFilename) != 0))) ||
- (LLFile::rename(tmp_filename, mProtectedDataFilename)))
+ try
+ {
+ // move the temporary file to the specified file location.
+ if((( (LLFile::isfile(mProtectedDataFilename) != 0)
+ && (LLFile::remove(mProtectedDataFilename) != 0)))
+ || (LLFile::rename(tmp_filename, mProtectedDataFilename)))
+ {
+ LL_WARNS() << "LLProtectedDataException(Could not overwrite protected data store)" << LL_ENDL;
+ LLFile::remove(tmp_filename);
+
+ // EXP-1825 crash in LLSecAPIBasicHandler::_writeProtectedData()
+ // Decided throwing an exception here was overkill until we figure out why this happens
+ //throw LLProtectedDataException("Could not overwrite protected data store");
+ }
+ }
+ catch (...)
{
+ LL_WARNS() << "LLProtectedDataException(Error renaming '" << tmp_filename
+ << "' to '" << mProtectedDataFilename << "')" << LL_ENDL;
+ // it's good practice to clean up any secure information on error
+ // (even though this file isn't really secure. Perhaps in the future
+ // it may be, however.
LLFile::remove(tmp_filename);
- // EXP-1825 crash in LLSecAPIBasicHandler::_writeProtectedData()
+ //crash in LLSecAPIBasicHandler::_writeProtectedData()
// Decided throwing an exception here was overkill until we figure out why this happens
- //throw LLProtectedDataException("Could not overwrite protected data store");
- LL_INFOS() << "LLProtectedDataException(Could not overwrite protected data store)" << LL_ENDL;
+ //throw LLProtectedDataException("Error writing Protected Data Store");
}
}