mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-06-04 06:02:40 +02:00
2018-06-23 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in ripcd(8) that caused process of the 'Air Gate' ['AG'] RML to fail.
This commit is contained in:
parent
58fa103f6e
commit
0e6372464f
@ -16666,3 +16666,6 @@
|
||||
2018-06-22 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added GPIO support for HPI devices to the 'Local Audio Adapter'
|
||||
switcher/gpio driver.
|
||||
2018-06-23 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in ripcd(8) that caused process of the 'Air Gate' ['AG']
|
||||
RML to fail.
|
||||
|
@ -908,6 +908,31 @@ void MainObject::RunLocalMacros(RDMacro *rml)
|
||||
}
|
||||
|
||||
|
||||
bool MainObject::CheckAirGate(RDMacro *rml)
|
||||
{
|
||||
char buffer[RD_RML_MAX_LENGTH];
|
||||
|
||||
if(rml->command()==RDMacro::AG) {
|
||||
if(ripc_onair_flag) {
|
||||
rml->generateString(buffer,RD_RML_MAX_LENGTH-1);
|
||||
QStringList f0=f0.split(" ",buffer);
|
||||
f0.pop_front();
|
||||
QString rmlstr=f0.join(" ");
|
||||
if(!rml->parseString(rmlstr,rmlstr.length())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
LogLine(RDConfig::LogDebug,
|
||||
QString("rejected rml: \"")+buffer+
|
||||
"\": on-air flag not active");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void MainObject::ForwardConvert(RDMacro *rml) const
|
||||
{
|
||||
//
|
||||
|
@ -565,7 +565,9 @@ void MainObject::DispatchCommand(int ch)
|
||||
}
|
||||
sprintf(cmd,"MS %s %d %s",(const char *)macro.address().toString(),
|
||||
echo,buffer);
|
||||
RunLocalMacros(¯o);
|
||||
if(CheckAirGate(¯o)) {
|
||||
RunLocalMacros(¯o);
|
||||
}
|
||||
BroadcastCommand(cmd);
|
||||
}
|
||||
else {
|
||||
@ -703,21 +705,8 @@ void MainObject::ReadRmlSocket(QSocketDevice *dev,RDMacro::Role role,
|
||||
while((n=dev->readBlock(buffer,RD_RML_MAX_LENGTH))>0) {
|
||||
buffer[n]=0;
|
||||
if(macro.parseString(buffer,n)) {
|
||||
if(macro.command()==RDMacro::AG) {
|
||||
if(ripc_onair_flag) {
|
||||
QStringList f0=f0.split(" ",buffer);
|
||||
f0.pop_front();
|
||||
QString rmlstr=f0.join(" ");
|
||||
if(!macro.parseString(rmlstr,rmlstr.length())) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
LogLine(RDConfig::LogDebug,
|
||||
QString("rejected rml: \"")+buffer+
|
||||
"\": on-air flag not active");
|
||||
break;
|
||||
}
|
||||
if(!CheckAirGate(¯o)) {
|
||||
break;
|
||||
}
|
||||
macro.setRole(role);
|
||||
macro.setAddress(dev->peerAddress());
|
||||
|
@ -93,6 +93,7 @@ class MainObject : public QObject
|
||||
QString StripPoint(QString);
|
||||
void LoadLocalMacros();
|
||||
void RunLocalMacros(RDMacro *rml);
|
||||
bool CheckAirGate(RDMacro *rml);
|
||||
void LoadGpiTable();
|
||||
void SendGpi(int ch,int matrix);
|
||||
void SendGpo(int ch,int matrix);
|
||||
|
Loading…
x
Reference in New Issue
Block a user