1
0
Fork 0

Update YSFGateway.cpp

This is not exactly elegant, its not a state issue exactly, just cant read reflector->m_wiresX when there is no reflector...
ycs232-kbc
Andy Taylor 6 years ago committed by GitHub
parent 7fc0fc7db7
commit 8288d64848
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -268,13 +268,22 @@ int CYSFGateway::run()
unsigned char ft = fich.getFT(); unsigned char ft = fich.getFT();
CYSFReflector* reflector = m_wiresX->getReflector(); CYSFReflector* reflector = m_wiresX->getReflector();
if ( (wiresXCommandPassthrough) && (reflector->m_wiresX) ) { if ( (wiresXCommandPassthrough) && (reflector) ) {
// Allow WiresX to Pass Through // Connected to a reflector, figure out what kind it is
if (reflector->m_wiresX) {
// Pass Control Commands (WiresX capable reflector)
processDTMF(buffer, dt); processDTMF(buffer, dt);
processWiresX(buffer, fi, dt, fn, ft, true); processWiresX(buffer, fi, dt, fn, ft, true);
} }
else { else {
// Don't Pass Control Commands // Don't Pass Control Commands (Not a WiresX capable reflector)
m_exclude = (dt == YSF_DT_DATA_FR_MODE);
processDTMF(buffer, dt);
processWiresX(buffer, fi, dt, fn, ft, false);
}
}
else {
// Don't Pass Control Commands (Not connected to a reflector)
m_exclude = (dt == YSF_DT_DATA_FR_MODE); m_exclude = (dt == YSF_DT_DATA_FR_MODE);
processDTMF(buffer, dt); processDTMF(buffer, dt);
processWiresX(buffer, fi, dt, fn, ft, false); processWiresX(buffer, fi, dt, fn, ft, false);

Loading…
Cancel
Save