mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-28 14:42:34 +02:00
2017-12-20 Fred Gleason <fredg@paravelsystems.com>
* Cleaned up 'log in use" messages in rdlogedit(1) and rdclilogedit(1).
This commit is contained in:
parent
aec8bba723
commit
0224380581
@ -16530,3 +16530,6 @@
|
||||
* Added a 'LOGS.LOCK_GUID' field to the database.
|
||||
* Incremented the database version to 274.
|
||||
* Added a 'LockLog' call to the Web API.
|
||||
2017-12-20 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Cleaned up 'log in use" messages in rdlogedit(1) and
|
||||
rdclilogedit(1).
|
||||
|
@ -649,10 +649,12 @@ int EditLog::exec()
|
||||
QHostAddress addr;
|
||||
|
||||
if(!edit_log_lock->tryLock(&username,&stationname,&addr)) {
|
||||
QMessageBox::warning(this,"RDLogEdit - "+tr("Log Locked"),
|
||||
tr("Log already being edited by")+" "+
|
||||
username+"@"+stationname+" ["+
|
||||
addr.toString()+"].");
|
||||
QString msg=tr("Log already being edited by")+" "+username+"@"+stationname;
|
||||
if(stationname!=addr.toString()) {
|
||||
msg+=" ["+addr.toString()+"]";
|
||||
}
|
||||
msg+=".";
|
||||
QMessageBox::warning(this,"RDLogEdit - "+tr("Log Locked"),msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -153,11 +153,11 @@ bool MainObject::TryLock(RDLogLock *lock,const QString &logname)
|
||||
|
||||
ret=lock->tryLock(&username,&stationname,&addr);
|
||||
if(!ret) {
|
||||
fprintf(stderr,"log \"%s\" in use by %s@%s [%s]\n",
|
||||
(const char *)logname,
|
||||
(const char *)username,
|
||||
(const char *)stationname,
|
||||
(const char *)addr.toString());
|
||||
QString msg="log \""+logname+"\" in use by "+username+"@"+stationname;
|
||||
if(stationname!=addr.toString()) {
|
||||
msg+=" ["+addr.toString()+"]";
|
||||
}
|
||||
fprintf(stderr,"%s\n",(const char *)msg);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user