2018-11-15 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in rdadmin(1) that prevented login from a system with
	no host record in the database.
This commit is contained in:
Fred Gleason
2018-11-15 14:39:00 -05:00
parent e8c619988f
commit fa7918d158
3 changed files with 19 additions and 12 deletions

View File

@@ -82,6 +82,7 @@ MainWidget::MainWidget(QWidget *parent)
{
QString str;
QString err_msg;
RDApplication::ErrorType err_type=RDApplication::ErrorOk;
//
// Fix the Window Size
@@ -110,9 +111,11 @@ MainWidget::MainWidget(QWidget *parent)
// Open the Database
//
rda=new RDApplication("RDAdmin","rdadmin",RDADMIN_USAGE,this);
if(!rda->open(&err_msg)) {
QMessageBox::critical(this,"RDAdmin - "+tr("Error"),err_msg);
exit(1);
if(!rda->open(&err_msg,&err_type)) {
if(err_type!=RDApplication::ErrorNoHostEntry) {
QMessageBox::critical(this,"RDAdmin - "+tr("Error"),err_msg);
exit(1);
}
}
setWindowTitle(QString("RDAdmin v")+VERSION+" - "+
tr("Host")+": "+rda->config()->stationName());