Changeset 523

Show
Ignore:
Timestamp:
04/25/09 09:15:58 (3 years ago)
Author:
uncle_fungus
Message:

Thread safety fixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/client.cpp

    r485 r523  
    146146        // The directory must exist, otherwise we can't do anything 
    147147        // If it doesn't exist, display an explicit message in the log part of the window 
    148         if(!multiProtocolFile::DirExists(mLocation)) 
     148        if(!multiProtocolFile::DirExists(mLocation.c_str())) 
    149149        { 
    150150                mLog = wxString::Format(_("Directory %s does not exist or cannot be read!"), mLocation.c_str()); 
     
    154154        } 
    155155 
    156         if (multiProtocolFile::FileExists(mLocation + _T("FAHlog.txt"))) 
    157         { 
    158                 mLastModification = multiProtocolFile::LastModification(mLocation + _T("FAHlog.txt")); 
     156        if (multiProtocolFile::FileExists(wxString::Format(wxT("%sFAHlog.txt"),mLocation.c_str()))) 
     157        { 
     158                mLastModification = multiProtocolFile::LastModification(wxString::Format(wxT("%sFAHlog.txt"),mLocation.c_str())); 
    159159        } 
    160160        else 
     
    169169 
    170170        // Try to load the log file of the client 
    171         if(!LoadLogFile(mLocation + _T("FAHlog.txt"))) 
     171        if(!LoadLogFile(wxString::Format(wxT("%sFAHlog.txt"),mLocation.c_str()))) 
    172172        { 
    173173                mLog = wxString::Format(_("Error while reading %sFAHlog.txt!"), mLocation.c_str()); 
     
    177177        } 
    178178 
    179         if(!LoadQueueFile(mLocation + _T("queue.dat"))) 
     179        if(!LoadQueueFile(wxString::Format(wxT("%squeue.dat"),mLocation.c_str()))) 
    180180        { 
    181181                _LogMsgError(wxString::Format(_("Error while reading %squeue.dat"), mLocation.c_str())); 
     
    194194 
    195195        // Try to load the 'unitinfo.txt' file generated by the client 
    196         if(!LoadUnitInfoFile(mLocation + _T("unitinfo.txt"))) 
     196        if(!LoadUnitInfoFile(wxString::Format(wxT("%sunitinfo.txt"),mLocation.c_str()))) 
    197197        { 
    198198                _LogMsgError(wxString::Format(_("Error while reading %sunitinfo.txt!"), mLocation.c_str())); 
     
    301301                                { 
    302302                                        clientLocation = BenchmarksManager::GetInstance()->GetClientLocationFromClientId(benchmarks[i]->GetClientId()); 
    303                                         clientName     = ClientsManager::GetInstance()->GetNameFromLocation(clientLocation); 
     303                                        clientName     = ClientsManager::GetInstance()->GetNameFromLocation(clientLocation.c_str()); 
    304304                                        if (clientName == mName) 
    305305                                        {