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

@@ -145,15 +145,6 @@ bool RDApplication::open(QString *err_msg,RDApplication::ErrorType *err_type)
// Open Accessors
//
app_station=new RDStation(app_config->stationName());
if(!app_station->exists()) {
if(err_type!=NULL) {
*err_type=RDApplication::ErrorNoHostEntry;
}
*err_msg=QObject::tr("This host")+" (\""+app_config->stationName()+"\") "+
QObject::tr("does not have a Hosts entry in the database.")+"\n"+
QObject::tr("Open RDAdmin->ManageHosts->Add to create one.");
return false;
}
app_system=new RDSystem();
app_library_conf=new RDLibraryConf(app_config->stationName());
app_logedit_conf=new RDLogeditConf(app_config->stationName());
@@ -164,6 +155,16 @@ bool RDApplication::open(QString *err_msg,RDApplication::ErrorType *err_type)
app_ripc=new RDRipc(app_station,app_config,this);
connect(app_ripc,SIGNAL(userChanged()),this,SLOT(userChangedData()));
if(!app_station->exists()) {
if(err_type!=NULL) {
*err_type=RDApplication::ErrorNoHostEntry;
}
*err_msg=QObject::tr("This host")+" (\""+app_config->stationName()+"\") "+
QObject::tr("does not have a Hosts entry in the database.")+"\n"+
QObject::tr("Open RDAdmin->ManageHosts->Add to create one.");
return false;
}
return true;
}