mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-26 10:19:45 +03:00
0031944: Foundation Classes, Message_Report - add missing mutex locks for message level
This commit is contained in:
parent
0177fe2617
commit
38b336df80
@ -185,6 +185,8 @@ void Message_Report::UpdateActiveInMessenger (const Handle(Message_Messenger)& t
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void Message_Report::AddLevel (Message_Level* theLevel, const TCollection_AsciiString& theName)
|
void Message_Report::AddLevel (Message_Level* theLevel, const TCollection_AsciiString& theName)
|
||||||
{
|
{
|
||||||
|
Standard_Mutex::Sentry aSentry (myMutex);
|
||||||
|
|
||||||
myAlertLevels.Append (theLevel);
|
myAlertLevels.Append (theLevel);
|
||||||
|
|
||||||
Handle(Message_AlertExtended) aLevelRootAlert = new Message_AlertExtended();
|
Handle(Message_AlertExtended) aLevelRootAlert = new Message_AlertExtended();
|
||||||
@ -220,6 +222,8 @@ void Message_Report::AddLevel (Message_Level* theLevel, const TCollection_AsciiS
|
|||||||
|
|
||||||
void Message_Report::RemoveLevel (Message_Level* theLevel)
|
void Message_Report::RemoveLevel (Message_Level* theLevel)
|
||||||
{
|
{
|
||||||
|
Standard_Mutex::Sentry aSentry (myMutex);
|
||||||
|
|
||||||
for (int aLevelIndex = myAlertLevels.Size(); aLevelIndex >= 1; aLevelIndex--)
|
for (int aLevelIndex = myAlertLevels.Size(); aLevelIndex >= 1; aLevelIndex--)
|
||||||
{
|
{
|
||||||
Message_Level* aLevel = myAlertLevels.Value (aLevelIndex);
|
Message_Level* aLevel = myAlertLevels.Value (aLevelIndex);
|
||||||
@ -247,6 +251,8 @@ void Message_Report::Clear()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Standard_Mutex::Sentry aSentry (myMutex);
|
||||||
|
|
||||||
compositeAlerts()->Clear();
|
compositeAlerts()->Clear();
|
||||||
myAlertLevels.Clear();
|
myAlertLevels.Clear();
|
||||||
}
|
}
|
||||||
@ -262,6 +268,8 @@ void Message_Report::Clear (Message_Gravity theGravity)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Standard_Mutex::Sentry aSentry (myMutex);
|
||||||
|
|
||||||
compositeAlerts()->Clear (theGravity);
|
compositeAlerts()->Clear (theGravity);
|
||||||
myAlertLevels.Clear();
|
myAlertLevels.Clear();
|
||||||
}
|
}
|
||||||
@ -277,6 +285,8 @@ void Message_Report::Clear (const Handle(Standard_Type)& theType)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Standard_Mutex::Sentry aSentry (myMutex);
|
||||||
|
|
||||||
compositeAlerts()->Clear (theType);
|
compositeAlerts()->Clear (theType);
|
||||||
myAlertLevels.Clear();
|
myAlertLevels.Clear();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user