mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-02 15:13:52 +01:00
2025-09-15 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in 'lib/rdairplay_conf.cpp' that caused database corruption when adding new host records. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -25048,3 +25048,6 @@
|
||||
2025-09-13 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in rdalsaconfig(8) that caused multiple card entries
|
||||
to appear for sound devices with more than one PCM.
|
||||
2025-09-15 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a regression in 'lib/rdairplay_conf.cpp' that caused database
|
||||
corruption when adding new host records.
|
||||
|
||||
@@ -37,14 +37,18 @@ RDAirPlayConf::RDAirPlayConf(const QString &station,const QString &tablename)
|
||||
sql=QString("select `ID` from `")+air_tablename+"` where "+
|
||||
"`STATION`='"+RDEscapeString(air_station)+"'";
|
||||
q=new RDSqlQuery(sql);
|
||||
if(q->first()) {
|
||||
air_id=q->value(0).toUInt();
|
||||
}
|
||||
else {
|
||||
air_id=-1;
|
||||
fprintf(stderr,"RDAirplayConf - no STATION record found for host \"%s\"\n",
|
||||
air_station.toUtf8().constData());
|
||||
if(!q->first()) {
|
||||
delete q;
|
||||
sql=QString("insert into `")+air_tablename+"` set "+
|
||||
"`STATION`='"+RDEscapeString(air_station)+"'";
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
sql=QString("select `ID` from `")+air_tablename+"` where "+
|
||||
"`STATION`='"+RDEscapeString(air_station)+"'";
|
||||
q=new RDSqlQuery(sql);
|
||||
q->first();
|
||||
}
|
||||
air_id=q->value(0).toUInt();
|
||||
delete q;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user