From 63fd2c6c2890d521ff1acd7299bfed0320e241e3 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Fri, 16 Apr 2021 10:18:17 -0400 Subject: [PATCH] 2021-04-16 Fred Gleason * Fixed bugs in rdadmin(1) that threw SQL errors when creating new host entries. * Disabled cloning on hotkey data when creating new host entries in rdadmin(1). Signed-off-by: Fred Gleason --- ChangeLog | 5 +++++ lib/rdstation.cpp | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ea7fda10..85ab02e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21439,3 +21439,8 @@ 2021-04-15 Fred Gleason * Fixed a bug in 'rdxport.cgi' that broke the build when compiling without the '--enable-rdxport-debug' switch. +2021-04-16 Fred Gleason + * Fixed bugs in rdadmin(1) that threw SQL errors when creating + new host entries. + * Disabled cloning on hotkey data when creating new host entries + in rdadmin(1). diff --git a/lib/rdstation.cpp b/lib/rdstation.cpp index 4c1666ee..d5a0df39 100644 --- a/lib/rdstation.cpp +++ b/lib/rdstation.cpp @@ -2,7 +2,7 @@ // // Abstract a Rivendell Workstation. // -// (C) Copyright 2002-2020 Fred Gleason +// (C) Copyright 2002-2021 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -1002,7 +1002,7 @@ bool RDStation::create(const QString &name,QString *err_msg, sql=QString("insert into RDLIBRARY set ")+ QString().sprintf("INPUT_CARD=%d,",q->value(0).toInt())+ QString().sprintf("INPUT_PORT=%d,",q->value(1).toInt())+ - QString().sprintf("INPUT_TYPE=%d,",q->value(2).toInt())+ + "INPUT_TYPE=\""+RDEscapeString(q->value(2).toString())+"\","+ QString().sprintf("OUTPUT_CARD=%d,",q->value(3).toInt())+ QString().sprintf("OUTPUT_PORT=%d,",q->value(4).toInt())+ QString().sprintf("VOX_THRESHOLD=%d,",q->value(5).toInt())+ @@ -1207,7 +1207,7 @@ bool RDStation::create(const QString &name,QString *err_msg, "DESCRIPTION_TEMPLATE=\""+RDEscapeString(q->value(22).toString())+"\","+ "EXIT_PASSWORD=\""+RDEscapeString(q->value(23).toString())+"\","+ "SKIN_PATH=\""+RDEscapeString(q->value(24).toString())+"\","+ - "SHOW_COUNTERS=\","+RDEscapeString(q->value(25).toString())+"\","+ + "SHOW_COUNTERS=\""+RDEscapeString(q->value(25).toString())+"\","+ "STATION=\""+RDEscapeString(name)+"\""; q1=new RDSqlQuery(sql); delete q1; @@ -1666,6 +1666,9 @@ bool RDStation::create(const QString &name,QString *err_msg, } delete q; + /* + * FIXME: Reinstate/remove hotkey support! + * // // Clone Hotkeys // @@ -1688,7 +1691,7 @@ bool RDStation::create(const QString &name,QString *err_msg, delete q1; } delete q; - + */ // // Clone PyPAD Instances //