From 19c5ce93646c8e8a90298d7600b24cfd4a338ad4 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Mon, 23 Mar 2015 17:05:28 -0400 Subject: [PATCH] 2015-03-23 Fred Gleason * Fixed a fencepost bug in 'ripcd/sasusi.cpp' that caused the last relay in the list to fail to respond to a 'GO' RML. --- ChangeLog | 3 +++ ripcd/sasusi.cpp | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e7635311..dee2d902 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14837,3 +14837,6 @@ 2015-03-16 Fred Gleason * Added 'DESCRIPTION', 'OUTCUE', 'FILENAME' and '*_POINT' fields to the 'Cart CSV Report' in 'rdlibrary/list_reports.cpp'. +2015-03-23 Fred Gleason + * Fixed a fencepost bug in 'ripcd/sasusi.cpp' that caused the + last relay in the list to fail to respond to a 'GO' RML. diff --git a/ripcd/sasusi.cpp b/ripcd/sasusi.cpp index 3eb52283..6edd5cee 100644 --- a/ripcd/sasusi.cpp +++ b/ripcd/sasusi.cpp @@ -288,10 +288,11 @@ void SasUsi::processCommand(RDMacro *cmd) } cmd_byte=0x01; } - if(cmd->arg(2).toUInt()arg(2).toUInt()<=sas_relay_numbers.size()) { if(sas_relay_numbers[cmd->arg(2).toUInt()-1]>=0) { snprintf(str,256,"\x05R%d%04d\x0D\x0A",cmd_byte, sas_relay_numbers[cmd->arg(2).toUInt()-1]); + syslog(LOG_NOTICE,"USI: %s",(const char *)PrettifyCommand(str)); SendCommand(str); cmd->acknowledge(true); emit rmlEcho(cmd);