LLAPRFile cleaned up

This commit is contained in:
Shyotl
2011-09-20 21:39:27 -05:00
parent 0ace809572
commit d917bf6b06
19 changed files with 126 additions and 215 deletions

View File

@@ -2677,8 +2677,7 @@ void LLAppViewer::handleViewerCrash()
else crash_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,ERROR_MARKER_FILE_NAME);
llinfos << "Creating crash marker file " << crash_file_name << llendl;
LLAPRFile crash_file ;
crash_file.open(crash_file_name, LL_APR_W, LLAPRFile::local);
LLAPRFile crash_file(crash_file_name, LL_APR_W);
if (crash_file.getFileHandle())
{
LL_INFOS("MarkerFile") << "Created crash marker file " << crash_file_name << LL_ENDL;
@@ -2749,8 +2748,7 @@ bool LLAppViewer::anotherInstanceRunning()
if (LLAPRFile::isExist(marker_file, LL_APR_RB))
{
// File exists, try opening with write permissions
LLAPRFile outfile ;
outfile.open(marker_file, LL_APR_WB, LLAPRFile::global);
LLAPRFile outfile(marker_file, LL_APR_WB);
apr_file_t* fMarker = outfile.getFileHandle() ;
if (!fMarker)
{
@@ -2827,7 +2825,7 @@ void LLAppViewer::initMarkerFile()
// Create the marker file for this execution & lock it
apr_status_t s;
s = mMarkerFile.open(mMarkerFileName, LL_APR_W, LLAPRFile::global);
s = mMarkerFile.open(mMarkerFileName, LL_APR_W, LLAPRFile::long_lived);
if (s == APR_SUCCESS && mMarkerFile.getFileHandle())
{
@@ -4027,8 +4025,7 @@ void LLAppViewer::sendLogoutRequest()
gLogoutInProgress = TRUE;
mLogoutMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LOGOUT_MARKER_FILE_NAME);
LLAPRFile outfile ;
outfile.open(mLogoutMarkerFileName, LL_APR_W, LLAPRFile::global);
LLAPRFile outfile(mLogoutMarkerFileName, LL_APR_W);
mLogoutMarkerFile = outfile.getFileHandle() ;
if (mLogoutMarkerFile)
{