2017-06-05 Fred Gleason <fredg@paravelsystems.com>

* Modified the 'Command Send' ['CC'] RML so as to have a destination
	argument of 'localhost' be sent to the localhost.
This commit is contained in:
Fred Gleason 2017-06-05 16:26:42 -04:00
parent 522c8c9996
commit ddee26a1f1
2 changed files with 28 additions and 21 deletions

View File

@ -15819,3 +15819,6 @@
2017-06-02 Fred Gleason <fredg@paravelsystems.com>
* Updated 'NEWS'.
* Incremented the package version to 2.16.0.
2017-06-05 Fred Gleason <fredg@paravelsystems.com>
* Modified the 'Command Send' ['CC'] RML so as to have a destination
argument of 'localhost' be sent to the localhost.

View File

@ -245,31 +245,35 @@ void RDMacroEvent::exec(int line)
if(args.size()==2) {
port=args[1].toUInt();
}
//stationname=event_cmds[line]->arg(0).toString();
sql=
QString().sprintf("select VARVALUE from HOSTVARS \
where (STATION_NAME=\"%s\")&&(NAME=\"%s\")",
(const char *)event_ripc->station(),
(const char *)stationname);
q=new RDSqlQuery(sql);
if(q->first()) {
stationname=q->value(0).toString();
}
delete q;
station=new RDStation(stationname);
if(station->exists()) {
rml.setAddress(station->address());
if(stationname.lower()=="localhost") {
rml.setAddress(QString("127.0.0.2"));
}
else {
addr.setAddress(stationname);
if(addr.isNull()) {
emit finished(line);
delete station;
return;
sql=
QString().sprintf("select VARVALUE from HOSTVARS \
where (STATION_NAME=\"%s\")&&(NAME=\"%s\")",
(const char *)event_ripc->station(),
(const char *)stationname);
q=new RDSqlQuery(sql);
if(q->first()) {
stationname=q->value(0).toString();
}
rml.setAddress(addr);
delete q;
station=new RDStation(stationname);
if(station->exists()) {
rml.setAddress(station->address());
}
else {
addr.setAddress(stationname);
if(addr.isNull()) {
emit finished(line);
delete station;
return;
}
rml.setAddress(addr);
}
delete station;
}
delete station;
rml.setArgQuantity(event_cmds[line]->argQuantity()-2);
cmd=
(RDMacro::Command)(256*event_cmds[line]->arg(1).toString().ascii()[0]+