2023-06-29 Fred Gleason <fredg@paravelsystems.com>

* Added a 'RDCoreApplication::isUniqueProcess()' static method.
	* Added processuniqueness checks to caed(8), rdairplay(1),
	rdrepld(8), rdrssd(8), rdservice(8), rdvairplayd(8), ripcd(8) and
	rdalsaconfig(8).

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2023-06-29 14:54:48 -04:00
parent 6e5c13fc38
commit c92b4dc703
55 changed files with 134 additions and 87 deletions

View File

@ -24260,3 +24260,8 @@
2023-06-23 Fred Gleason <fredg@paravelsystems.com> 2023-06-23 Fred Gleason <fredg@paravelsystems.com>
* Updated the 'INSTALL' file to cover use of the 'configure_build.sh' * Updated the 'INSTALL' file to cover use of the 'configure_build.sh'
script. script.
2023-06-29 Fred Gleason <fredg@paravelsystems.com>
* Added a 'RDCoreApplication::isUniqueProcess()' static method.
* Added processuniqueness checks to caed(8), rdairplay(1),
rdrepld(8), rdrssd(8), rdservice(8), rdvairplayd(8), ripcd(8) and
rdalsaconfig(8).

View File

@ -2,7 +2,7 @@
// //
// The Core Audio Engine component of Rivendell // The Core Audio Engine component of Rivendell
// //
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -93,7 +93,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("caed","caed", rda=static_cast<RDApplication *>(new RDCoreApplication("caed","caed",
CAED_USAGE,false,this)); CAED_USAGE,false,this));
if(!rda->open(&err_msg,&err_type,false)) { if(!rda->open(&err_msg,&err_type,false,true)) {
fprintf(stderr,"caed: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"caed: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -64,7 +64,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("nexgen_filter", rda=static_cast<RDApplication *>(new RDCoreApplication("nexgen_filter",
"nexgen_filter",NEXGEN_FILTER_USAGE,false,this)); "nexgen_filter",NEXGEN_FILTER_USAGE,false,this));
if(!rda->open(&err_msg,NULL,false)) { if(!rda->open(&err_msg,NULL,false,false)) {
fprintf(stderr,"nexgen_filter: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"nexgen_filter: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -52,7 +52,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("wings_filter", rda=static_cast<RDApplication *>(new RDCoreApplication("wings_filter",
"wings_filter",WINGS_FILTER_USAGE,false,this)); "wings_filter",WINGS_FILTER_USAGE,false,this));
if(!rda->open(&err_msg,NULL,false)) { if(!rda->open(&err_msg,NULL,false,false)) {
fprintf(stderr,"wings_filter: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"wings_filter: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -1,4 +1,4 @@
// rdapplication.cpp // rdcoreapplication.cpp
// //
// Base Application Class // Base Application Class
// //
@ -22,6 +22,9 @@
#include <syslog.h> #include <syslog.h>
#include <QApplication> #include <QApplication>
#include <QDir>
#include <QFile>
#include <QIODevice>
#include <QProcess> #include <QProcess>
#include <QStyleFactory> #include <QStyleFactory>
#include <QTranslator> #include <QTranslator>
@ -132,8 +135,8 @@ RDCoreApplication::~RDCoreApplication()
} }
bool RDCoreApplication::open(QString *err_msg,RDCoreApplication::ErrorType *err_type, bool RDCoreApplication::open(QString *err_msg,ErrorType *err_type,
bool check_svc) bool check_svc,bool check_unique)
{ {
int schema=0; int schema=0;
QString db_err; QString db_err;
@ -177,6 +180,17 @@ bool RDCoreApplication::open(QString *err_msg,RDCoreApplication::ErrorType *err_
} }
} }
//
// Process Uniqueness Check
//
if(check_unique) {
if(!isUniqueProcess(app_command_name)) {
fprintf(stderr,"%s: prior instance found\n",
app_command_name.toUtf8().constData());
exit(RDApplication::ExitPriorInstance);
}
}
// //
// Open rd.conf(5) // Open rd.conf(5)
// //
@ -638,6 +652,32 @@ QString RDCoreApplication::exitCodeText(RDCoreApplication::ExitCode code)
} }
bool RDCoreApplication::isUniqueProcess(const QString &cmdname)
{
bool ok=false;
QStringList dirs=
QDir("/proc").entryList(QDir::Dirs|QDir::NoDotAndDotDot);
for(int i=0;i<dirs.size();i++) {
pid_t pid=dirs.at(i).toUInt(&ok);
if(ok&&(pid!=getpid())) {
QFile *file=new QFile("/proc/"+dirs.at(i)+"/cmdline");
if(file->open(QIODevice::ReadOnly)) {
QString cmdline(QString::fromUtf8(file->readAll()));
QStringList f0=cmdline.trimmed().split("/",QString::SkipEmptyParts);
if((f0.size()>0)&&(f0.last().trimmed()==cmdname)) {
delete file;
return false;
}
}
delete file;
}
}
return true;
}
void RDCoreApplication::userChangedData() void RDCoreApplication::userChangedData()
{ {
QString sql; QString sql;

View File

@ -2,7 +2,7 @@
// //
// Base Application Class // Base Application Class
// //
// (C) Copyright 2018-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2018-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -58,7 +58,8 @@ class RDCoreApplication : public QObject
RDCoreApplication(const QString &module_name,const QString &cmdname, RDCoreApplication(const QString &module_name,const QString &cmdname,
const QString &usage,bool use_translations,QObject *parent); const QString &usage,bool use_translations,QObject *parent);
~RDCoreApplication(); ~RDCoreApplication();
bool open(QString *err_msg,ErrorType *err_type,bool check_svc); bool open(QString *err_msg,ErrorType *err_type,
bool check_svc,bool check_unique);
RDAirPlayConf *airplayConf(); RDAirPlayConf *airplayConf();
RDCae *cae(); RDCae *cae();
RDCmdSwitch *cmdSwitch(); RDCmdSwitch *cmdSwitch();
@ -89,6 +90,7 @@ class RDCoreApplication : public QObject
const QString &login_name=QString()); const QString &login_name=QString());
static void syslog(RDConfig *config,int priority,const char *fmt,...); static void syslog(RDConfig *config,int priority,const char *fmt,...);
static QString exitCodeText(ExitCode code); static QString exitCodeText(ExitCode code);
static bool isUniqueProcess(const QString &cmdname);
private slots: private slots:
void userChangedData(); void userChangedData();

View File

@ -84,7 +84,7 @@ MainWidget::MainWidget(RDConfig *config,RDWidget *parent)
// Open the Database // Open the Database
// //
rda=new RDApplication("RDAdmin","rdadmin",RDADMIN_USAGE,true,this); rda=new RDApplication("RDAdmin","rdadmin",RDADMIN_USAGE,true,this);
if(!rda->open(&err_msg,&err_type,false)) { if(!rda->open(&err_msg,&err_type,false,false)) {
if(err_type!=RDApplication::ErrorNoHostEntry) { if(err_type!=RDApplication::ErrorNoHostEntry) {
QMessageBox::critical(this,"RDAdmin - "+tr("Error"),err_msg); QMessageBox::critical(this,"RDAdmin - "+tr("Error"),err_msg);
exit(RDCoreApplication::ExitNoDb); exit(RDCoreApplication::ExitNoDb);

View File

@ -74,7 +74,7 @@ MainWidget::MainWidget(RDConfig *config,QWidget *parent)
// Open the Database // Open the Database
// //
rda=new RDApplication("RDAirPlay","rdairplay",RDAIRPLAY_USAGE,true,this); rda=new RDApplication("RDAirPlay","rdairplay",RDAIRPLAY_USAGE,true,this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,true)) {
QMessageBox::critical(this,"RDAirPlay - "+tr("Error"),err_msg); QMessageBox::critical(this,"RDAirPlay - "+tr("Error"),err_msg);
exit(1); exit(1);
} }

View File

@ -35,7 +35,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
// Open the Database // Open the Database
// //
rda=new RDApplication("RDCartSlots","rdcartslots",RDCARTSLOTS_USAGE,true,this); rda=new RDApplication("RDCartSlots","rdcartslots",RDCARTSLOTS_USAGE,true,this);
if(!rda->open(&err_msg,NULL,false)) { if(!rda->open(&err_msg,NULL,false,false)) {
QMessageBox::critical(this,"RDCartSlots - "+tr("Error"),err_msg); QMessageBox::critical(this,"RDCartSlots - "+tr("Error"),err_msg);
exit(1); exit(1);
} }

View File

@ -59,7 +59,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
// //
rda=new RDApplication("RDCastManager","rdcastmanager",RDCASTMANAGER_USAGE,true, rda=new RDApplication("RDCastManager","rdcastmanager",RDCASTMANAGER_USAGE,true,
this); this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
QMessageBox::critical(this,"RDCastManager - "+tr("Error"),err_msg); QMessageBox::critical(this,"RDCastManager - "+tr("Error"),err_msg);
exit(1); exit(1);
} }

View File

@ -67,7 +67,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
// Open the Database // Open the Database
// //
rda=new RDApplication("RDCatch","rdcatch",RDCATCH_USAGE,true,this); rda=new RDApplication("RDCatch","rdcatch",RDCATCH_USAGE,true,this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
QMessageBox::critical(this,"RDCatch - "+tr("Error"),err_msg); QMessageBox::critical(this,"RDCatch - "+tr("Error"),err_msg);
exit(1); exit(1);
} }

View File

@ -91,7 +91,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("rdcatchd","rdcatchd", rda=static_cast<RDApplication *>(new RDCoreApplication("rdcatchd","rdcatchd",
RDCATCHD_USAGE,false,this)); RDCATCHD_USAGE,false,this));
if(!rda->open(&err_msg,&err_type,false)) { if(!rda->open(&err_msg,&err_type,false,false)) {
fprintf(stderr,"rdcatchd: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"rdcatchd: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -87,7 +87,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
// Open the Database // Open the Database
// //
rda=new RDApplication("RDLibrary","rdlibrary",RDLIBRARY_USAGE,true,this); rda=new RDApplication("RDLibrary","rdlibrary",RDLIBRARY_USAGE,true,this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
QMessageBox::critical(this,"RDLibrary - "+tr("Error"),err_msg); QMessageBox::critical(this,"RDLibrary - "+tr("Error"),err_msg);
exit(1); exit(1);
} }

View File

@ -61,7 +61,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
// Open the Database // Open the Database
// //
rda=new RDApplication("RDLogEdit","rdlogedit",RDLOGEDIT_USAGE,true,this); rda=new RDApplication("RDLogEdit","rdlogedit",RDLOGEDIT_USAGE,true,this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
QMessageBox::critical(this,"RDLogEdit - "+tr("Error"),err_msg); QMessageBox::critical(this,"RDLogEdit - "+tr("Error"),err_msg);
exit(1); exit(1);
} }

View File

@ -48,7 +48,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
// Open the database // Open the database
// //
rda=new RDApplication("RDLogin","rdlogin",RDLOGIN_USAGE,true,this); rda=new RDApplication("RDLogin","rdlogin",RDLOGIN_USAGE,true,this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
QMessageBox::critical(this,"RDLogin - "+tr("Error"),err_msg); QMessageBox::critical(this,"RDLogin - "+tr("Error"),err_msg);
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// Command Line Operations for RDLogManager // Command Line Operations for RDLogManager
// //
// (C) Copyright 2012-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2012-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -47,7 +47,7 @@ int RunReportOperation(int argc,char *argv[],const QString &rptname,
rda=static_cast<RDApplication *>(new RDCoreApplication("RDLogManager", rda=static_cast<RDApplication *>(new RDCoreApplication("RDLogManager",
"rdlogmanager",RDLOGMANAGER_USAGE,true,NULL)); "rdlogmanager",RDLOGMANAGER_USAGE,true,NULL));
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"rdlogmanager: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"rdlogmanager: %s\n",err_msg.toUtf8().constData());
exit(RDApplication::ExitNoDb); exit(RDApplication::ExitNoDb);
} }

View File

@ -2,7 +2,7 @@
// //
// Generate/merge logs from the command line. // Generate/merge logs from the command line.
// //
// (C) Copyright 2018-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2018-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -46,7 +46,7 @@ LogObject::LogObject(const QString &svcname,int start_offset,
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("RDLogManager", rda=static_cast<RDApplication *>(new RDCoreApplication("RDLogManager",
"rdlogmanager","",true,NULL)); "rdlogmanager","",true,NULL));
if(!rda->open(&err_msg,NULL,false)) { if(!rda->open(&err_msg,NULL,false,false)) {
fprintf(stderr,"rdlogmanager: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"rdlogmanager: %s\n",err_msg.toUtf8().constData());
exit(RDApplication::ExitNoDb); exit(RDApplication::ExitNoDb);
} }

View File

@ -54,7 +54,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
// //
rda=new RDApplication("RDLogManager","rdlogmanager",RDLOGMANAGER_USAGE,true, rda=new RDApplication("RDLogManager","rdlogmanager",RDLOGMANAGER_USAGE,true,
this); this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
QMessageBox::critical(this,"RDLogManager - "+tr("Error"),err_msg); QMessageBox::critical(this,"RDLogManager - "+tr("Error"),err_msg);
exit(RDApplication::ExitNoDb); exit(RDApplication::ExitNoDb);
} }

View File

@ -2,7 +2,7 @@
// //
// Rivendell PAD Consolidation Server // Rivendell PAD Consolidation Server
// //
// (C) Copyright 2018-2021 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2018-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -56,7 +56,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("rdpadengined", rda=static_cast<RDApplication *>(new RDCoreApplication("rdpadengined",
"rdpadengined",RDPADENGINED_USAGE,false,this)); "rdpadengined",RDPADENGINED_USAGE,false,this));
if(!rda->open(&err_msg,&err_type,false)) { if(!rda->open(&err_msg,&err_type,false,true)) {
fprintf(stderr,"rdpadengined: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"rdpadengined: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -54,7 +54,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
// Open the Database // Open the Database
// //
rda=new RDApplication("RDPanel","rdpanel",RDPANEL_USAGE,true,this); rda=new RDApplication("RDPanel","rdpanel",RDPANEL_USAGE,true,this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
QMessageBox::critical(this,"RDPanel - "+tr("Error"),err_msg); QMessageBox::critical(this,"RDPanel - "+tr("Error"),err_msg);
exit(1); exit(1);
} }

View File

@ -73,7 +73,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("rdrepld","rdrepld", rda=static_cast<RDApplication *>(new RDCoreApplication("rdrepld","rdrepld",
RDREPLD_USAGE,false,this)); RDREPLD_USAGE,false,this));
if(!rda->open(&err_msg,&err_type,false)) { if(!rda->open(&err_msg,&err_type,false,true)) {
fprintf(stderr,"rdrepld: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"rdrepld: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -41,7 +41,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("rdrssd","rdrssd", rda=static_cast<RDApplication *>(new RDCoreApplication("rdrssd","rdrssd",
RDRSSD_USAGE,false,this)); RDRSSD_USAGE,false,this));
if(!rda->open(&err_msg,&err_type,false)) { if(!rda->open(&err_msg,&err_type,false,true)) {
fprintf(stderr,"rdrssd: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"rdrssd: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// Rivendell Services Manager // Rivendell Services Manager
// //
// (C) Copyright 2018-2021 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2018-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -68,7 +68,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("rdservice","rdservice", rda=static_cast<RDApplication *>(new RDCoreApplication("rdservice","rdservice",
"\n\n",false,this)); "\n\n",false,this));
if(!rda->open(&err_msg,&err_type,false)) { if(!rda->open(&err_msg,&err_type,false,true)) {
rda->syslog(LOG_ERR,"unable to open database [%s]", rda->syslog(LOG_ERR,"unable to open database [%s]",
err_msg.toUtf8().constData()); err_msg.toUtf8().constData());
exit(RDApplication::ExitNoDb); exit(RDApplication::ExitNoDb);

View File

@ -68,7 +68,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("rdvairplayd", rda=static_cast<RDApplication *>(new RDCoreApplication("rdvairplayd",
"rdvairplayd",RDVAIRPLAYD_USAGE,false,this)); "rdvairplayd",RDVAIRPLAYD_USAGE,false,this));
if(!rda->open(&err_msg,&err_type,false)) { if(!rda->open(&err_msg,&err_type,false,true)) {
fprintf(stderr,"rdvairplayd: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"rdvairplayd: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// Rivendell Interprocess Communication Daemon // Rivendell Interprocess Communication Daemon
// //
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -73,7 +73,7 @@ MainObject::MainObject(QObject *parent)
rda=static_cast<RDApplication *>(new RDCoreApplication("ripcd","ripcd", rda=static_cast<RDApplication *>(new RDCoreApplication("ripcd","ripcd",
RIPCD_USAGE,false,this)); RIPCD_USAGE,false,this));
if(!rda->open(&err_msg,&err_type,false)) { if(!rda->open(&err_msg,&err_type,false,true)) {
fprintf(stderr,"ripcd: %s\n",(const char *)err_msg.toUtf8()); fprintf(stderr,"ripcd: %s\n",(const char *)err_msg.toUtf8());
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// Test the Rivendell file format converter. // Test the Rivendell file format converter.
// //
// (C) Copyright 2010-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2010-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -44,7 +44,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("audio_convert_test", rda=static_cast<RDApplication *>(new RDCoreApplication("audio_convert_test",
"audio_convert_test",AUDIO_CONVERT_TEST_USAGE,false,this)); "audio_convert_test",AUDIO_CONVERT_TEST_USAGE,false,this));
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"audio_convert_test: %s\n",(const char *)err_msg.toUtf8()); fprintf(stderr,"audio_convert_test: %s\n",(const char *)err_msg.toUtf8());
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// Test the Rivendell file format exporter. // Test the Rivendell file format exporter.
// //
// (C) Copyright 2010-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2010-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -46,7 +46,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("audio_export_test", rda=static_cast<RDApplication *>(new RDCoreApplication("audio_export_test",
"audio_export_test",AUDIO_EXPORT_TEST_USAGE,false,this)); "audio_export_test",AUDIO_EXPORT_TEST_USAGE,false,this));
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"audio_export_test: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"audio_export_test: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// Test Rivendell file importing. // Test Rivendell file importing.
// //
// (C) Copyright 2010-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2010-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -47,7 +47,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("audio_import_test", rda=static_cast<RDApplication *>(new RDCoreApplication("audio_import_test",
"audio_import_test",AUDIO_IMPORT_TEST_USAGE,false,this)); "audio_import_test",AUDIO_IMPORT_TEST_USAGE,false,this));
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"audio_import_test: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"audio_import_test: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// Test the Rivendell audio file metadata reader. // Test the Rivendell audio file metadata reader.
// //
// (C) Copyright 2018-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2018-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -37,7 +37,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("audio_metadata_test", rda=static_cast<RDApplication *>(new RDCoreApplication("audio_metadata_test",
"audio_metadata_test",AUDIO_METADATA_TEST_USAGE,false,this)); "audio_metadata_test",AUDIO_METADATA_TEST_USAGE,false,this));
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"audio_metadata_test: %s\n",(const char *)err_msg.toUtf8()); fprintf(stderr,"audio_metadata_test: %s\n",(const char *)err_msg.toUtf8());
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// Display charset/collation parameters for a DB connection // Display charset/collation parameters for a DB connection
// //
// (C) Copyright 2018-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2018-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -44,7 +44,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDApplication("db_charset_test", rda=static_cast<RDApplication *>(new RDApplication("db_charset_test",
"rdvairplayd",DB_CHARSET_TEST_USAGE,false,this)); "rdvairplayd",DB_CHARSET_TEST_USAGE,false,this));
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"db_charset_test: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"db_charset_test: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// Test Rivendell file deletion routines. // Test Rivendell file deletion routines.
// //
// (C) Copyright 2010-2021 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2010-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -41,7 +41,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=new RDApplication("delete_test","delete_test",DELETE_TEST_USAGE,false, rda=new RDApplication("delete_test","delete_test",DELETE_TEST_USAGE,false,
this); this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"delete_test: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"delete_test: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -43,7 +43,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=new RDApplication("download_test","download_test",DOWNLOAD_TEST_USAGE, rda=new RDApplication("download_test","download_test",DOWNLOAD_TEST_USAGE,
false,this); false,this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"download_test: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"download_test: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// Test Rivendell image storage // Test Rivendell image storage
// //
// (C) Copyright 2010-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2010-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -47,7 +47,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=new RDApplication("feed_image_test","feed_image_test", rda=new RDApplication("feed_image_test","feed_image_test",
FEED_IMAGE_TEST_USAGE,false,this); FEED_IMAGE_TEST_USAGE,false,this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"feed_image_test: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"feed_image_test: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -41,7 +41,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=new RDApplication("metadata_wildcard_test","metadata_wildcard_test", rda=new RDApplication("metadata_wildcard_test","metadata_wildcard_test",
METADATA_WILDCARD_TEST_USAGE,false,this); METADATA_WILDCARD_TEST_USAGE,false,this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"metadata_wildcard_test: %s\n",(const char *)err_msg.toUtf8()); fprintf(stderr,"metadata_wildcard_test: %s\n",(const char *)err_msg.toUtf8());
exit(1); exit(1);
} }

View File

@ -36,7 +36,7 @@ MainWidget::MainWidget(QWidget *parent)
// //
rda=new RDApplication("meterstrip_test","meterstrip_test",METERSTRIP_TEST_USAGE, rda=new RDApplication("meterstrip_test","meterstrip_test",METERSTRIP_TEST_USAGE,
false,this); false,this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
QMessageBox::critical(this,"meterstrip_test - "+tr("Error"),err_msg); QMessageBox::critical(this,"meterstrip_test - "+tr("Error"),err_msg);
exit(RDApplication::ExitNoDb); exit(RDApplication::ExitNoDb);
} }

View File

@ -2,7 +2,7 @@
// //
// Test Rivendell RDNotification class. // Test Rivendell RDNotification class.
// //
// (C) Copyright 2019-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2019-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -31,7 +31,7 @@ MainObject::MainObject(QObject *parent)
rda=new RDApplication("notification_test","notification_test", rda=new RDApplication("notification_test","notification_test",
NOTIFICATION_TEST_USAGE,false,this); NOTIFICATION_TEST_USAGE,false,this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"notification_test: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"notification_test: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// Test the RDTimeEngine class // Test the RDTimeEngine class
// //
// (C) Copyright 2021 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2021-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -42,7 +42,7 @@ MainObject::MainObject(QObject *parent)
"timeengine_test", "timeengine_test",
TIMEENGINE_TEST_USAGE, TIMEENGINE_TEST_USAGE,
false,this)); false,this));
if(!rda->open(&err_msg,&err_type,false)) { if(!rda->open(&err_msg,&err_type,false,false)) {
fprintf(stderr,"timeengine_test: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"timeengine_test: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -43,7 +43,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=new RDApplication("upload_test","upload_test",UPLOAD_TEST_USAGE,false, rda=new RDApplication("upload_test","upload_test",UPLOAD_TEST_USAGE,false,
this); this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"upload_test: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"upload_test: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -44,7 +44,7 @@ MainWidget::MainWidget(QWidget *parent)
// //
rda=new RDApplication("wavefactory_test","wavefactory_test", rda=new RDApplication("wavefactory_test","wavefactory_test",
WAVEFACTORY_TEST_USAGE,false,this); WAVEFACTORY_TEST_USAGE,false,this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
QMessageBox::critical(this,"wavefactory_test - "+tr("Error"),err_msg); QMessageBox::critical(this,"wavefactory_test - "+tr("Error"),err_msg);
exit(RDApplication::ExitNoDb); exit(RDApplication::ExitNoDb);
} }

View File

@ -2,7 +2,7 @@
// //
// Test harness for RDWaveScene // Test harness for RDWaveScene
// //
// (C) Copyright 2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2022-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -43,7 +43,7 @@ MainWidget::MainWidget(QWidget *parent)
// //
rda=new RDApplication("wavescene_test","wavescene_test",WAVESCENE_TEST_USAGE, rda=new RDApplication("wavescene_test","wavescene_test",WAVESCENE_TEST_USAGE,
false,this); false,this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
QMessageBox::critical(this,"wavescene_test - "+tr("Error"),err_msg); QMessageBox::critical(this,"wavescene_test - "+tr("Error"),err_msg);
exit(RDApplication::ExitNoDb); exit(RDApplication::ExitNoDb);
} }

View File

@ -2,7 +2,7 @@
// //
// Test harness for RDWaveWidget // Test harness for RDWaveWidget
// //
// (C) Copyright 2021-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2021-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -42,7 +42,7 @@ MainWidget::MainWidget(QWidget *parent)
// //
rda=new RDApplication("wavewidget_test","wavewidget_test",WAVEWIDGET_TEST_USAGE, rda=new RDApplication("wavewidget_test","wavewidget_test",WAVEWIDGET_TEST_USAGE,
false,this); false,this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
QMessageBox::critical(this,"wavewidget_test - "+tr("Error"),err_msg); QMessageBox::critical(this,"wavewidget_test - "+tr("Error"),err_msg);
exit(RDApplication::ExitNoDb); exit(RDApplication::ExitNoDb);
} }

View File

@ -84,7 +84,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
// //
rda=new RDApplication("RDAlsaConfig","rdalsaconfig",RDALSACONFIG_USAGE,false, rda=new RDApplication("RDAlsaConfig","rdalsaconfig",RDALSACONFIG_USAGE,false,
this); this);
if(!rda->open(&err_msg,NULL,false)) { if(!rda->open(&err_msg,NULL,false,true)) {
QMessageBox::critical(this,"RDAlsaConfig - "+tr("Error"),err_msg); QMessageBox::critical(this,"RDAlsaConfig - "+tr("Error"),err_msg);
exit(1); exit(1);
} }
@ -365,7 +365,7 @@ Autogen::Autogen()
// //
rda=new RDApplication("RDAlsaConfig","rdalsaconfig",RDALSACONFIG_USAGE, rda=new RDApplication("RDAlsaConfig","rdalsaconfig",RDALSACONFIG_USAGE,
false,this); false,this);
if(!rda->open(&err_msg,NULL,false)) { if(!rda->open(&err_msg,NULL,false,true)) {
fprintf(stderr,"rdalsaconfig: unable to open database [%s]\n", fprintf(stderr,"rdalsaconfig: unable to open database [%s]\n",
(const char *)err_msg.toUtf8()); (const char *)err_msg.toUtf8());
exit(1); exit(1);

View File

@ -44,7 +44,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("rdcheckcuts", rda=static_cast<RDApplication *>(new RDCoreApplication("rdcheckcuts",
"rdcheckcuts",RDCHECKCUTS_USAGE,false,this)); "rdcheckcuts",RDCHECKCUTS_USAGE,false,this));
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"rdcheckcuts: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"rdcheckcuts: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// A command-line log editor for Rivendell // A command-line log editor for Rivendell
// //
// (C) Copyright 2016-2021 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2016-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -50,7 +50,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("rdclilogedit", rda=static_cast<RDApplication *>(new RDCoreApplication("rdclilogedit",
"rdclilogedit",RDCLILOGEDIT_USAGE,false,this)); "rdclilogedit",RDCLILOGEDIT_USAGE,false,this));
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"rdclilogedit: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"rdclilogedit: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// Rivendell file format converter. // Rivendell file format converter.
// //
// (C) Copyright 2017-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2017-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -44,7 +44,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("rdconvert","rdconvert", rda=static_cast<RDApplication *>(new RDCoreApplication("rdconvert","rdconvert",
RDCONVERT_USAGE,false,this)); RDCONVERT_USAGE,false,this));
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"rdconvert: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"rdconvert: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// A Batch Deleter for Rivendell. // A Batch Deleter for Rivendell.
// //
// (C) Copyright 2013-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2013-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -45,7 +45,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("rddelete","rddelete", rda=static_cast<RDApplication *>(new RDCoreApplication("rddelete","rddelete",
RDDELETE_USAGE,false,this)); RDDELETE_USAGE,false,this));
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,true)) {
fprintf(stderr,"rddelete: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"rddelete: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// A Batch Exporter for Rivendell. // A Batch Exporter for Rivendell.
// //
// (C) Copyright 2016-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2016-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -58,7 +58,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("rdexport","rdexport", rda=static_cast<RDApplication *>(new RDCoreApplication("rdexport","rdexport",
RDEXPORT_USAGE,false,this)); RDEXPORT_USAGE,false,this));
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"rdexport: %s\n",(const char *)err_msg.toUtf8()); fprintf(stderr,"rdexport: %s\n",(const char *)err_msg.toUtf8());
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// A Qt-based application for testing General Purpose Input (GPI) devices. // A Qt-based application for testing General Purpose Input (GPI) devices.
// //
// (C) Copyright 2002-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -39,7 +39,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
// Open the Database // Open the Database
// //
rda=new RDApplication("RDGpiMon","rdgpimon",RDGPIMON_USAGE,true,this); rda=new RDApplication("RDGpiMon","rdgpimon",RDGPIMON_USAGE,true,this);
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
QMessageBox::critical(this,"RDGpiMon - "+tr("Error"),err_msg); QMessageBox::critical(this,"RDGpiMon - "+tr("Error"),err_msg);
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// A Batch Importer for Rivendell. // A Batch Importer for Rivendell.
// //
// (C) Copyright 2002-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2002-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -109,7 +109,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("rdimport","rdimport", rda=static_cast<RDApplication *>(new RDCoreApplication("rdimport","rdimport",
RDIMPORT_USAGE,false,this)); RDIMPORT_USAGE,false,this));
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"rdimport: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"rdimport: %s\n",err_msg.toUtf8().constData());
ErrorExit(RDApplication::ExitNoDb); ErrorExit(RDApplication::ExitNoDb);
} }

View File

@ -2,7 +2,7 @@
// //
// A Utility for running periodic system maintenance. // A Utility for running periodic system maintenance.
// //
// (C) Copyright 2008-2021 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2008-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -59,7 +59,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("rdmaint","rdmaint", rda=static_cast<RDApplication *>(new RDCoreApplication("rdmaint","rdmaint",
RDMAINT_USAGE,false,this)); RDMAINT_USAGE,false,this));
if(!rda->open(&err_msg,NULL,false)) { if(!rda->open(&err_msg,NULL,false,true)) {
fprintf(stderr,"rdmaint: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"rdmaint: %s\n",err_msg.toUtf8().constData());
rda->syslog(LOG_ERR,"%s",err_msg.toUtf8().constData()); rda->syslog(LOG_ERR,"%s",err_msg.toUtf8().constData());
exit(1); exit(1);

View File

@ -2,7 +2,7 @@
// //
// Command-line tool for setting Rivendell Cut Markers // Command-line tool for setting Rivendell Cut Markers
// //
// (C) Copyright 2014-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2014-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -59,7 +59,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("rdmarkerset", rda=static_cast<RDApplication *>(new RDCoreApplication("rdmarkerset",
"rdmarkerset",RDMARKERSET_USAGE,false,this)); "rdmarkerset",RDMARKERSET_USAGE,false,this));
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"rdmarkerset: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"rdmarkerset: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -3,7 +3,7 @@
// Command-line tool for setting Rivendell Cart Metadata // Command-line tool for setting Rivendell Cart Metadata
// //
// Patrick Linstruth <patrick@deltecent.com> // Patrick Linstruth <patrick@deltecent.com>
// (C) Copyright 2019-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2019-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -51,7 +51,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("rdmetadata", rda=static_cast<RDApplication *>(new RDCoreApplication("rdmetadata",
"rdmetadata",RDMETADATA_USAGE,false,this)); "rdmetadata",RDMETADATA_USAGE,false,this));
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"rdmetadata: %s\n",err_msg.toUtf8().constData()); fprintf(stderr,"rdmetadata: %s\n",err_msg.toUtf8().constData());
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// Render a Rivendell log. // Render a Rivendell log.
// //
// (C) Copyright 2017-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2017-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -69,7 +69,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("rdrender","rdrender", rda=static_cast<RDApplication *>(new RDCoreApplication("rdrender","rdrender",
RDRENDER_USAGE,false,this)); RDRENDER_USAGE,false,this));
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
fprintf(stderr,"rdrender: %s\n",(const char *)err_msg.toUtf8()); fprintf(stderr,"rdrender: %s\n",(const char *)err_msg.toUtf8());
exit(1); exit(1);
} }

View File

@ -2,7 +2,7 @@
// //
// Rivendell web service portal // Rivendell web service portal
// //
// (C) Copyright 2010-2021 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2010-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -51,7 +51,7 @@ Xport::Xport(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("rdxport.cgi", rda=static_cast<RDApplication *>(new RDCoreApplication("rdxport.cgi",
"rdxport.cgi",RDXPORT_CGI_USAGE,false,this)); "rdxport.cgi",RDXPORT_CGI_USAGE,false,this));
if(!rda->open(&err_msg,NULL,false)) { if(!rda->open(&err_msg,NULL,false,false)) {
printf("Content-type: text/html\n"); printf("Content-type: text/html\n");
printf("Status: 500\n"); printf("Status: 500\n");
printf("\n"); printf("\n");

View File

@ -2,7 +2,7 @@
// //
// Rivendell upload/download utility // Rivendell upload/download utility
// //
// (C) Copyright 2018-2022 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2018-2023 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -52,7 +52,7 @@ MainObject::MainObject(QObject *parent)
// //
rda=static_cast<RDApplication *>(new RDCoreApplication("webget.cgi", rda=static_cast<RDApplication *>(new RDCoreApplication("webget.cgi",
"webget.cgi",WEBGET_CGI_USAGE,false,this)); "webget.cgi",WEBGET_CGI_USAGE,false,this));
if(!rda->open(&err_msg,NULL,true)) { if(!rda->open(&err_msg,NULL,true,false)) {
TextExit(err_msg,500,LINE_NUMBER); TextExit(err_msg,500,LINE_NUMBER);
} }