diff options
author | Philipp Lohmann <pl@openoffice.org> | 2002-01-22 17:48:00 +0000 |
---|---|---|
committer | Philipp Lohmann <pl@openoffice.org> | 2002-01-22 17:48:00 +0000 |
commit | f934a0b640e1cf361809e15f296c903a64c546c7 (patch) | |
tree | 969794dbba703540d064fb49085203b73c61123e /extensions/source/plugin | |
parent | 3b6edd94702be7e0ae80769b035d852d357f1fbb (diff) |
#96839# protect mediator listener by mutex
Diffstat (limited to 'extensions/source/plugin')
-rw-r--r-- | extensions/source/plugin/inc/plugin/unx/mediator.hxx | 5 | ||||
-rw-r--r-- | extensions/source/plugin/unx/mediator.cxx | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/extensions/source/plugin/inc/plugin/unx/mediator.hxx b/extensions/source/plugin/inc/plugin/unx/mediator.hxx index fa57ea8bd476..8e7d6a51e4e0 100644 --- a/extensions/source/plugin/inc/plugin/unx/mediator.hxx +++ b/extensions/source/plugin/inc/plugin/unx/mediator.hxx @@ -2,9 +2,9 @@ * * $RCSfile: mediator.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: pl $ $Date: 2001-10-23 17:31:20 $ + * last change: $Author: pl $ $Date: 2002-01-22 18:48:00 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -205,6 +205,7 @@ class MediatorListener : public NAMESPACE_VOS( OThread ) friend class Mediator; private: Mediator* m_pMediator; + ::vos::OMutex m_aMutex; MediatorListener( Mediator* ); ~MediatorListener(); diff --git a/extensions/source/plugin/unx/mediator.cxx b/extensions/source/plugin/unx/mediator.cxx index 3ef41142554f..99307aa665ae 100644 --- a/extensions/source/plugin/unx/mediator.cxx +++ b/extensions/source/plugin/unx/mediator.cxx @@ -2,9 +2,9 @@ * * $RCSfile: mediator.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: pl $ $Date: 2001-10-23 17:31:20 $ + * last change: $Author: pl $ $Date: 2002-01-22 18:48:00 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -78,6 +78,7 @@ Mediator::~Mediator() { if( m_pListener ) { + ::vos::OGuard aGuard( m_pListener->m_aMutex ); m_pListener->m_pMediator = NULL; m_pListener = NULL; if( m_bValid ) @@ -208,6 +209,7 @@ void MediatorListener::run() char* pBuffer = new char[ nHeader[ 1 ] ]; if( m_pMediator && read( m_pMediator->m_nSocket, pBuffer, nHeader[ 1 ] ) == nHeader[ 1 ] ) { + ::vos::OGuard aMyGuard( m_aMutex ); { NAMESPACE_VOS(OGuard) aGuard( m_pMediator->m_aQueueMutex ); |