From 9d86e0711768178f8ce5f7f42b273568f4b78f98 Mon Sep 17 00:00:00 2001 From: Andy Taylor Date: Tue, 29 Jan 2019 16:02:43 +0000 Subject: [PATCH] Update YSFGateway.cpp Cleaned up the string compares, they are now so fast that I need to experiment with the timing - I can see why you detest the string compare :) --- YSFGateway/YSFGateway.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YSFGateway/YSFGateway.cpp b/YSFGateway/YSFGateway.cpp index 9859411..c107c91 100644 --- a/YSFGateway/YSFGateway.cpp +++ b/YSFGateway/YSFGateway.cpp @@ -268,7 +268,7 @@ int CYSFGateway::run() unsigned char ft = fich.getFT(); CYSFReflector* reflector = m_wiresX->getReflector(); - if ( (wiresXCommandPassthrough) && (m_linkType == LINK_YSF) && (reflector->m_name.rfind("YSF2DMR", 0) == 0 || reflector->m_name.rfind("YSF2P25", 0) == 0 || reflector->m_name.rfind("YSF2NXDN", 0) == 0) ) { + if ( (wiresXCommandPassthrough) && (reflector->reflector->m_wiresX) ) { // Allow WiresX to Pass Through processDTMF(buffer, dt); processWiresX(buffer, fi, dt, fn, ft, true); @@ -541,7 +541,7 @@ void CYSFGateway::processWiresX(const unsigned char* buffer, unsigned char fi, u m_linkType = LINK_YSF; // If we are linking to a YSF2xxx mode, send the YSF2xxx gateway the link command too - if (reflector->m_name.rfind("YSF2DMR", 0) == 0 || reflector->m_name.rfind("YSF2P25", 0) == 0 || reflector->m_name.rfind("YSF2NXDN", 0) == 0) { + if (reflector->m_wiresX) { m_wiresX->sendConnect(m_ysfNetwork); } }