From 66fe9ca8351aa9d92d8a8b00e12ac421ea990716 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Mon, 13 Mar 2023 12:19:12 -0400 Subject: [PATCH] 2023-03-11 Fred Gleason * Fixed a bug in rdadmin(1) that threw a SQL error when attempting to create a new Switcher/GPIO instance. Signed-off-by: Fred Gleason --- ChangeLog | 3 +++ rdadmin/edit_matrix.cpp | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 010134ab..e32ee49d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24006,3 +24006,6 @@ 2023-03-07 Fred Gleason * Fixed a regression in rdvairplayd(8) that caused a segfault on startup. +2023-03-11 Fred Gleason + * Fixed a bug in rdadmin(1) that threw a SQL error when attempting + to create a new Switcher/GPIO instance. diff --git a/rdadmin/edit_matrix.cpp b/rdadmin/edit_matrix.cpp index 03cd4c53..27c1da63 100644 --- a/rdadmin/edit_matrix.cpp +++ b/rdadmin/edit_matrix.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Matrix // -// (C) Copyright 2002-2021 Fred Gleason +// (C) Copyright 2002-2023 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 @@ -1538,6 +1538,9 @@ void EditMatrix::AddResources(RDMatrix::VguestType type) const if(edit_matrix->type()==RDMatrix::LogitekVguest) { sql+=QString::asprintf("`VGUEST_TYPE`=%d,",type); } + else { + sql+=QString::asprintf("`VGUEST_TYPE`=%d,",RDMatrix::VguestTypeNone); + } sql+=QString::asprintf("`NUMBER`=%d",i+1); RDSqlQuery::apply(sql); }