Update YSFGateway.cpp

Send the disconnect to the YSF2xxx gateway too
This commit is contained in:
Andy Taylor 2019-01-27 01:24:49 +00:00 committed by GitHub
parent aaee560119
commit 2013dd91b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -574,6 +574,10 @@ void CYSFGateway::processWiresX(const unsigned char* buffer, unsigned char fi, u
case WXS_DISCONNECT:
if (m_linkType == LINK_YSF) {
LogMessage("Disconnect has been requested by %10.10s", buffer + 14U);
if ( (wiresXCommandPassthrough) && (::memcmp(buffer + 0U, "YSFD", 4U) == 0) ) {
// Send the disconnect to the YSF2xxx gateway too
m_ysfNetwork->write(buffer);
}
m_ysfNetwork->writeUnlink(3U);
m_ysfNetwork->clearDestination();