|
|
@ -180,7 +180,7 @@ bool CWiresX::start()
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
WX_STATUS CWiresX::process(const unsigned char* data, const unsigned char* source, unsigned char fi, unsigned char dt, unsigned char fn, unsigned char ft)
|
|
|
|
WX_STATUS CWiresX::process(const unsigned char* data, const unsigned char* source, unsigned char fi, unsigned char dt, unsigned char fn, unsigned char ft, bool wiresXCommandPassthrough)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
assert(data != NULL);
|
|
|
|
assert(data != NULL);
|
|
|
|
assert(source != NULL);
|
|
|
|
assert(source != NULL);
|
|
|
@ -227,23 +227,44 @@ WX_STATUS CWiresX::process(const unsigned char* data, const unsigned char* sourc
|
|
|
|
if (!valid)
|
|
|
|
if (!valid)
|
|
|
|
return WXS_NONE;
|
|
|
|
return WXS_NONE;
|
|
|
|
|
|
|
|
|
|
|
|
if (::memcmp(m_command + 1U, DX_REQ, 3U) == 0) {
|
|
|
|
// If we are using WiresX Passthrough (we already know we are on a YSF2xxx room from YSFGateway
|
|
|
|
processDX(source);
|
|
|
|
if (wiresXCommandPassthrough == true) {
|
|
|
|
return WXS_NONE;
|
|
|
|
if (::memcmp(m_command + 1U, DX_REQ, 3U) == 0) {
|
|
|
|
} else if (::memcmp(m_command + 1U, ALL_REQ, 3U) == 0) {
|
|
|
|
return WXS_NONE;
|
|
|
|
processAll(source, m_command + 5U);
|
|
|
|
} else if (::memcmp(m_command + 1U, ALL_REQ, 3U) == 0) {
|
|
|
|
return WXS_NONE;
|
|
|
|
return WXS_NONE;
|
|
|
|
} else if (::memcmp(m_command + 1U, CONN_REQ, 3U) == 0) {
|
|
|
|
} else if (::memcmp(m_command + 1U, CONN_REQ, 3U) == 0) {
|
|
|
|
return processConnect(source, m_command + 5U);
|
|
|
|
return WXS_NONE;
|
|
|
|
} else if (::memcmp(m_command + 1U, DISC_REQ, 3U) == 0) {
|
|
|
|
} else if (::memcmp(m_command + 1U, DISC_REQ, 3U) == 0) {
|
|
|
|
processDisconnect(source);
|
|
|
|
processDisconnect(source);
|
|
|
|
return WXS_DISCONNECT;
|
|
|
|
return WXS_DISCONNECT;
|
|
|
|
} else if (::memcmp(m_command + 1U, CAT_REQ, 3U) == 0) {
|
|
|
|
} else if (::memcmp(m_command + 1U, CAT_REQ, 3U) == 0) {
|
|
|
|
processCategory(source, m_command + 5U);
|
|
|
|
return WXS_NONE;
|
|
|
|
return WXS_NONE;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
CUtils::dump("Unknown Wires-X command", m_command, cmd_len);
|
|
|
|
CUtils::dump("Unknown Wires-X command", m_command, cmd_len);
|
|
|
|
return WXS_NONE;
|
|
|
|
return WXS_NONE;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Origional Code Here
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
if (::memcmp(m_command + 1U, DX_REQ, 3U) == 0) {
|
|
|
|
|
|
|
|
processDX(source);
|
|
|
|
|
|
|
|
return WXS_NONE;
|
|
|
|
|
|
|
|
} else if (::memcmp(m_command + 1U, ALL_REQ, 3U) == 0) {
|
|
|
|
|
|
|
|
processAll(source, m_command + 5U);
|
|
|
|
|
|
|
|
return WXS_NONE;
|
|
|
|
|
|
|
|
} else if (::memcmp(m_command + 1U, CONN_REQ, 3U) == 0) {
|
|
|
|
|
|
|
|
return processConnect(source, m_command + 5U);
|
|
|
|
|
|
|
|
} else if (::memcmp(m_command + 1U, DISC_REQ, 3U) == 0) {
|
|
|
|
|
|
|
|
processDisconnect(source);
|
|
|
|
|
|
|
|
return WXS_DISCONNECT;
|
|
|
|
|
|
|
|
} else if (::memcmp(m_command + 1U, CAT_REQ, 3U) == 0) {
|
|
|
|
|
|
|
|
processCategory(source, m_command + 5U);
|
|
|
|
|
|
|
|
return WXS_NONE;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
CUtils::dump("Unknown Wires-X command", m_command, cmd_len);
|
|
|
|
|
|
|
|
return WXS_NONE;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|