From a18a97b5fb37a63e6e7fc7c20951b99c610bee65 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Wed, 25 Oct 2017 09:02:37 -0400 Subject: [PATCH] 2017-10-25 Fred Gleason * 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. --- ChangeLog | 6 ++++++ lib/rdstation.cpp | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/ChangeLog b/ChangeLog index 50fafbdc..567b035d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16201,3 +16201,9 @@ 2017-10-25 Fred Gleason * Fixed a bug in rdadmin(1) that caused a segfault when opening the 'Edit Host' dialog. +2017-10-25 Fred Gleason + * 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. diff --git a/lib/rdstation.cpp b/lib/rdstation.cpp index df8ba3f1..813754b9 100644 --- a/lib/rdstation.cpp +++ b/lib/rdstation.cpp @@ -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; }