2016-07-22 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in 'utils/rdclilogedit/operations.cpp' that caused
	spurious 'no such service' errors when using the 'setservice'
	command on new logs.
This commit is contained in:
Fred Gleason 2016-07-22 13:05:02 -04:00
parent ef248a0c57
commit 797b6e5849
2 changed files with 8 additions and 3 deletions

View File

@ -15385,3 +15385,7 @@
2016-07-22 Fred Gleason <fredg@paravelsystems.com>
* Added support for using the ';' character as the command separator
for rdclilogedit(1).
2016-07-22 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'utils/rdclilogedit/operations.cpp' that caused
spurious 'no such service' errors when using the 'setservice'
command on new logs.

View File

@ -21,6 +21,7 @@
#include <rdconf.h>
#include <rdcreate_log.h>
#include <rdescape_string.h>
#include <rdsvc.h>
#include "rdclilogedit.h"
@ -453,8 +454,8 @@ void MainObject::Setpurgedate(const QDate &date)
void MainObject::Setservice(const QString &str)
{
RDLog *log=new RDLog(str);
if(log->exists()) {
RDSvc *svc=new RDSvc(str);
if(svc->exists()) {
edit_service=str;
edit_modified=true;
}
@ -462,7 +463,7 @@ void MainObject::Setservice(const QString &str)
fprintf(stderr,"setservice: no such service\n");
fprintf(stderr,"(Do \"listservices\" for a list\n");
}
delete log;
delete svc;
}