juribeparada / MMDVM_CM

Cross-mode conversion tools for MMDVM software
43 stars 53 forks source link

YSF2DMR not re-link after XLX restart #16

Open ik5xmk opened 5 years ago

ik5xmk commented 5 years ago

Hello, if you restart XLX (service xlxd restart) YSF2DMR can not always reconnect to XLX. The process is active but the data do not pass, so you need to kill the YSF2DMR process and restart the program. Is it possible to check (for example every minute) if the connection between YSF2DMR and XLX is active and working, or does it automatically restart the connection? Thank you, David

yo2loj commented 5 years ago

The correction is actually simple... File YSF2DMR.cpp, line 358, after:

    if (m_dmrNetwork->isConnected() && !m_xlxmodule.empty() && !m_xlxConnected) {
        writeXLXLink(m_srcid, m_dstid, m_dmrNetwork);
        LogMessage("XLX, Linking to reflector XLX%03u, module %s", m_xlxrefl,  m_xlxmodule.c_str());
        m_xlxConnected = true;
           }

add this:

        else if (!m_dmrNetwork->isConnected() && !m_xlxmodule.empty() && m_xlxConnected) {
            LogMessage("XLX, Disconnected from reflector XLX%03u, module %s", m_xlxrefl, m_xlxmodule.c_str());
            m_xlxConnected = false;
               }

This will resend the 400x TG request on reconnect... Marius, YO2LOJ

juribeparada commented 5 years ago

Hi Marius, can you do a PR with these changes?

yo2loj commented 5 years ago

Done, #23