mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-11 07:05:48 +01:00
2019-12-04 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in ripcd(8) that caused input and output counts to be calculated incorrectly for Software Authority protocol devices containing holes in the input and/or output lists.
This commit is contained in:
@@ -255,7 +255,7 @@ void SoftwareAuthority::DispatchCommand()
|
||||
QString section=line_in.lower().replace(">>","");
|
||||
|
||||
//
|
||||
// Startup Sequence. Get the input and output lists.
|
||||
// Startup Sequence. Get initial GPIO states and the input and output lists.
|
||||
//
|
||||
if(section=="login successful") {
|
||||
sprintf(buffer,"gpistat %d\x0D\x0A",swa_card); // Request GPI States
|
||||
@@ -305,7 +305,6 @@ void SoftwareAuthority::DispatchCommand()
|
||||
delete q;
|
||||
return;
|
||||
}
|
||||
swa_inputs++;
|
||||
f0=line_in.split("\t",QString::KeepEmptyParts);
|
||||
name=f0[1];
|
||||
if(f0.size()>=7) {
|
||||
@@ -330,6 +329,9 @@ void SoftwareAuthority::DispatchCommand()
|
||||
QString().sprintf("MATRIX=%d,",swa_matrix)+
|
||||
QString().sprintf("NUMBER=%d",f0[0].toInt());
|
||||
}
|
||||
if(f0[0].toInt()>swa_inputs) {
|
||||
swa_inputs=f0[0].toInt();
|
||||
}
|
||||
delete q;
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
@@ -357,7 +359,6 @@ void SoftwareAuthority::DispatchCommand()
|
||||
}
|
||||
return;
|
||||
}
|
||||
swa_outputs++;
|
||||
f0=line_in.split("\t",QString::KeepEmptyParts);
|
||||
name=f0[1];
|
||||
if(f0.size()>=6) {
|
||||
@@ -382,6 +383,9 @@ void SoftwareAuthority::DispatchCommand()
|
||||
QString().sprintf("MATRIX=%d,",swa_matrix)+
|
||||
QString().sprintf("NUMBER=%d",f0[0].toInt());
|
||||
}
|
||||
if(f0[0].toInt()>swa_outputs) {
|
||||
swa_outputs=f0[0].toInt();
|
||||
}
|
||||
delete q;
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
|
||||
Reference in New Issue
Block a user