2017-10-14 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in RDStation that caused RLM plug-in parameters to
	fail to be copied as part of the profile of a new host.
This commit is contained in:
Fred Gleason 2017-10-14 15:16:59 -04:00
parent 2381fb89ff
commit 4513dba74d
2 changed files with 30 additions and 1 deletions

View File

@ -16102,3 +16102,6 @@
2017-10-14 Fred Gleason <fredg@paravelsystems.com>
* Implemented a 'NewHostIpAddress=' parameter in the [Provisioning]
section of rd.conf(5).
2017-10-14 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in RDStation that caused RLM plug-in parameters to
fail to be copied as part of the profile of a new host.

View File

@ -1090,7 +1090,7 @@ bool RDStation::create(const QString &name,QString *err_msg,
delete q;
//
// RDAirPlay Log Modes
// Clone RDAirPlay Log Modes
//
sql=QString("select ")+
"MACHINE,"+ // 00
@ -1504,6 +1504,27 @@ bool RDStation::create(const QString &name,QString *err_msg,
delete q1;
}
delete q;
//
// Clone RLM Parameters
//
sql=QString("select ")+
"LOG_MACHINE,"+ // 00
"PLUGIN_PATH,"+ // 01
"PLUGIN_ARG "+ // 02
"from NOWNEXT_PLUGINS where "+
"STATION_NAME=\""+RDEscapeString(exemplar)+"\"";
q=new RDSqlQuery(sql);
while(q->next()) {
sql=QString("insert into NOWNEXT_PLUGINS set ")+
"STATION_NAME=\""+RDEscapeString(name)+"\","+
QString().sprintf("LOG_MACHINE=%u,",q->value(0).toUInt())+
"PLUGIN_PATH=\""+RDEscapeString(q->value(1).toString())+"\","+
"PLUGIN_ARG=\""+RDEscapeString(q->value(2).toString())+"\"";
q1=new RDSqlQuery(sql);
delete q1;
}
delete q;
}
return true;
}
@ -1640,6 +1661,11 @@ void RDStation::remove(const QString &name)
"STATION_NAME=\""+RDEscapeString(name)+"\"";
q=new RDSqlQuery(sql);
delete q;
sql=QString("delete from NOWNEXT_PLUGINS where ")+
"STATION_NAME=\""+RDEscapeString(name)+"\"";
q=new RDSqlQuery(sql);
delete q;
}
void RDStation::SetRow(const QString &param,const QString &value) const