Make simulator listeners safe against multiple starts

refs #909
This commit is contained in:
Roland Winklmeier
2017-03-25 18:57:57 +01:00
committed by Mathew Sutcliffe
parent 0eaab1753d
commit aafe211b5c
8 changed files with 45 additions and 23 deletions

View File

@@ -707,7 +707,7 @@ namespace BlackSimPlugin
CSimulatorXPlaneListener::CSimulatorXPlaneListener(const CSimulatorPluginInfo &info): ISimulatorListener(info)
{ }
void CSimulatorXPlaneListener::start()
void CSimulatorXPlaneListener::startImpl()
{
if (m_watcher) { return; } // already started
if (isXBusRunning())
@@ -723,7 +723,7 @@ namespace BlackSimPlugin
}
}
void CSimulatorXPlaneListener::stop()
void CSimulatorXPlaneListener::stopImpl()
{
if (m_watcher)
{

View File

@@ -204,12 +204,12 @@ namespace BlackSimPlugin
//! Constructor
CSimulatorXPlaneListener(const BlackMisc::Simulation::CSimulatorPluginInfo &info);
public slots:
//! \copydoc BlackCore::ISimulatorListener::start
virtual void start() override;
protected:
//! \copydoc BlackCore::ISimulatorListener::startImpl
virtual void startImpl() override;
//! \copydoc BlackCore::ISimulatorListener::stop
virtual void stop() override;
//! \copydoc BlackCore::ISimulatorListener::stopImpl
virtual void stopImpl() override;
private:
//! \brief Check if XBus service is already registered