]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix for bug PAL8727.
authorasv <asv@opencascade.com>
Fri, 29 Apr 2005 11:17:32 +0000 (11:17 +0000)
committerasv <asv@opencascade.com>
Fri, 29 Apr 2005 11:17:32 +0000 (11:17 +0000)
In method _SaveAs() (called from Save(), SaveAs(), SaveAscii(), SaveAsAscii()) there was a double call to SALOMEDS::lock() from different threads.  The first call was in Save(), and the second - was in some Engine::Save().
The fix consists in calling to unlock() BEFORE calling Engine::Save() and lock() again - after the call.

src/SALOMEDS/SALOMEDS_StudyManager_i.cxx

index d0464d63f55576ce0c856d08105aad1bf0359cce..3c2ae551b96a3cef96567b8c9381f060873176b7 100644 (file)
@@ -831,10 +831,12 @@ void SALOMEDS_StudyManager_i::_SaveAs(const char* aUrl,
            
            SALOMEDS::TMPFile_var aStream;
            
+           SALOMEDS::unlock(); // asv : fix for PAL8727 
            if(theASCII) 
              aStream = Engine->SaveASCII(sco,SALOMEDS_Tool::GetDirFromPath(aUrl).c_str(),theMultiFile);
            else
              aStream = Engine->Save(sco,SALOMEDS_Tool::GetDirFromPath(aUrl).c_str(),theMultiFile);
+           SALOMEDS::lock();  // asv : fix for PAL8727
 
            HDFdataset *hdf_dataset;
            hdf_size aHDFSize[1];