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

* Fixed a bug in the 'RDStation::create()' method that caused JACK
	client setting to fail to be copied to new host configurations.
	* Fixed a bug in the 'RDStation::removed()' method that caused JACK
	client setting to fail to be cleaned up when deleting host
	configurations.
This commit is contained in:
Fred Gleason 2017-10-25 09:02:37 -04:00
parent 939cd03a30
commit a18a97b5fb
2 changed files with 30 additions and 0 deletions

View File

@ -16201,3 +16201,9 @@
2017-10-25 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdadmin(1) that caused a segfault when opening the
'Edit Host' dialog.
2017-10-25 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in the 'RDStation::create()' method that caused JACK
client setting to fail to be copied to new host configurations.
* Fixed a bug in the 'RDStation::removed()' method that caused JACK
client setting to fail to be cleaned up when deleting host
configurations.

View File

@ -1712,6 +1712,25 @@ bool RDStation::create(const QString &name,QString *err_msg,
delete q1;
}
delete q;
//
// Clone JACK Clients
//
sql=QString("select ")+
"DESCRIPTION,"+ // 00
"COMMAND_LINE "+ // 01
"from JACK_CLIENTS where "+
"STATION_NAME=\""+RDEscapeString(exemplar)+"\"";
q=new RDSqlQuery(sql);
while(q->next()) {
sql=QString("insert into JACK_CLIENTS set ")+
"STATION_NAME=\""+RDEscapeString(name)+"\","+
"DESCRIPTION=\""+RDEscapeString(q->value(0).toString())+"\","+
"COMMAND_LINE=\""+RDEscapeString(q->value(1).toString())+"\"";
q1=new RDSqlQuery(sql);
delete q1;
}
delete q;
}
return true;
}
@ -1863,6 +1882,11 @@ void RDStation::remove(const QString &name)
"STATION_NAME=\""+RDEscapeString(name)+"\"";
q=new RDSqlQuery(sql);
delete q;
sql=QString("delete from JACK_CLIENTS where ")+
"STATION_NAME=\""+RDEscapeString(name)+"\"";
q=new RDSqlQuery(sql);
delete q;
}