Fix infinite loop problems in CAT error shutdown.

The TransceiverBase class attempts to  turn off PTT on closedown, this
was  causing an  infinite loop  if the  close down  was due  to a  CAT
communications error.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4347 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2014-09-24 17:24:40 +00:00
parent bb37fdeedc
commit c2ce8536f1

View File

@ -40,13 +40,14 @@ void TransceiverBase::start () noexcept
{
if (m_->state_.online ())
{
m_->state_.online (false);
// ensure PTT isn't left set
do_ptt (false);
do_post_ptt (false);
do_stop ();
do_post_stop ();
m_->state_.online (false);
}
do_start ();
do_post_start ();
@ -73,6 +74,8 @@ void TransceiverBase::stop () noexcept
{
if (m_->state_.online ())
{
m_->state_.online (false);
// ensure PTT isn't left set
do_ptt (false);
do_post_ptt (false);
@ -80,7 +83,6 @@ void TransceiverBase::stop () noexcept
do_stop ();
do_post_stop ();
m_->state_.online (false);
}
catch (std::exception const& e)
{
@ -265,8 +267,13 @@ void TransceiverBase::offline (QString const& reason)
if (m_->state_.online ())
{
m_->state_.online (false);
do_stop ();
// ensure PTT isn't left set
do_ptt (false);
do_post_ptt (false);
}
do_stop ();
do_post_stop ();
}
catch (std::exception const& e)
{