mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-25 08:56:00 +02:00
2017-12-22 Fred Gleason <fredg@paravelsystems.com>
* Added a lock check for before deleting logs in rdlogedit(1).
This commit is contained in:
parent
54a807fe3d
commit
606816591e
@ -16537,3 +16537,5 @@
|
||||
* Added log locking logic to the 'SaveLog' Web API call.
|
||||
2017-12-21 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added log locking logic to rdlogmanager(1).
|
||||
2017-12-22 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a lock check for before deleting logs in rdlogedit(1).
|
||||
|
@ -40,25 +40,25 @@
|
||||
#include <qpixmap.h>
|
||||
#include <qpainter.h>
|
||||
|
||||
#include <dbversion.h>
|
||||
#include <rd.h>
|
||||
#include <rdadd_log.h>
|
||||
#include <rdcheck_daemons.h>
|
||||
#include <rdcmd_switch.h>
|
||||
#include <rdconf.h>
|
||||
#include <rddb.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdloglock.h>
|
||||
#include <rdmixer.h>
|
||||
#include <rdripc.h>
|
||||
#include <rdstation.h>
|
||||
#include <rdcheck_daemons.h>
|
||||
//#include <rdcreate_log.h>
|
||||
#include <rdadd_log.h>
|
||||
#include <rdcmd_switch.h>
|
||||
#include <rddb.h>
|
||||
#include <rdtextfile.h>
|
||||
#include <rdmixer.h>
|
||||
#include <dbversion.h>
|
||||
#include <rdescape_string.h>
|
||||
|
||||
#include <rdlogedit.h>
|
||||
#include <edit_log.h>
|
||||
#include <globals.h>
|
||||
#include "edit_log.h"
|
||||
#include "globals.h"
|
||||
#include "rdlogedit.h"
|
||||
#ifndef WIN32
|
||||
#include <voice_tracker.h>
|
||||
#include "voice_tracker.h"
|
||||
#endif // WIN32
|
||||
|
||||
//
|
||||
@ -531,17 +531,33 @@ void MainWidget::deleteData()
|
||||
}
|
||||
|
||||
for(unsigned i=0;i<items.size();i++) {
|
||||
RDLog *log=new RDLog(items.at(i)->text(1));
|
||||
if(log->remove(rdstation_conf,rduser,log_config)) {
|
||||
delete items.at(i);
|
||||
QString username;
|
||||
QString stationname;
|
||||
QHostAddress addr;
|
||||
RDLogLock *log_lock=new RDLogLock(items.at(i)->text(1),rduser,
|
||||
rdstation_conf,this);
|
||||
if(log_lock->tryLock(&username,&stationname,&addr)) {
|
||||
RDLog *log=new RDLog(items.at(i)->text(1));
|
||||
if(log->remove(rdstation_conf,rduser,log_config)) {
|
||||
delete items.at(i);
|
||||
}
|
||||
else {
|
||||
QMessageBox::warning(this,"RDLogEdit - "+tr("Error"),
|
||||
tr("Unable to delete log")+" \""+
|
||||
items.at(i)->text(1)+"\", "+
|
||||
tr("audio deletion error!"));
|
||||
}
|
||||
delete log;
|
||||
}
|
||||
else {
|
||||
QMessageBox::warning(this,"RDLogEdit - "+tr("Error"),
|
||||
tr("Unable to delete log")+" \""+
|
||||
items.at(i)->text(1)+"\", "+
|
||||
tr("audio deletion error!"));
|
||||
QString msg=tr("Log")+" "+items.at(i)->text(1)+"\" "+
|
||||
tr("is in use by")+" "+username+"@"+stationname;
|
||||
if(stationname!=addr.toString()) {
|
||||
msg+=" ["+addr.toString()+"]";
|
||||
}
|
||||
QMessageBox::warning(this,"RDLogEdit - "+tr("Error"),msg);
|
||||
}
|
||||
delete log;
|
||||
delete log_lock;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -939,6 +939,14 @@ Vyhledejte svého správce systému kvůli aktualizaci!</translation>
|
||||
<source>Windows</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>is in use by</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RenderDialog</name>
|
||||
|
@ -938,6 +938,14 @@ See your system administrator for an update!</source>
|
||||
<source>Windows</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>is in use by</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RenderDialog</name>
|
||||
|
@ -935,6 +935,14 @@ See your system administrator for an update!</source>
|
||||
<source>Windows</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>is in use by</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RenderDialog</name>
|
||||
|
@ -851,6 +851,14 @@ See your system administrator for an update!</source>
|
||||
<source>Windows</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>is in use by</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RenderDialog</name>
|
||||
|
@ -956,6 +956,14 @@ See your system administrator for an update!</source>
|
||||
<source>Windows</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>is in use by</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RenderDialog</name>
|
||||
|
@ -956,6 +956,14 @@ See your system administrator for an update!</source>
|
||||
<source>Windows</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>is in use by</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RenderDialog</name>
|
||||
|
@ -935,6 +935,14 @@ See your system administrator for an update!</source>
|
||||
<source>Windows</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Log</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>is in use by</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>RenderDialog</name>
|
||||
|
Loading…
x
Reference in New Issue
Block a user