mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-24 08:31:41 +02:00
2018-12-18 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdpadengined(8) that failed to kill a pypad script after receiving a DELETE notification for it.
This commit is contained in:
parent
bc42ff435c
commit
f148205d10
@ -18214,3 +18214,6 @@
|
||||
* Added a 'PYPAD_INSTANCES.EXIT_CODE' field to the database.
|
||||
* Added a 'PYPAD_INSTANCES.ERROR_TEXT' field to the database.
|
||||
* Incremented the database version to 304.
|
||||
2018-12-18 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in rdpadengined(8) that failed to kill a pypad
|
||||
script after receiving a DELETE notification for it.
|
||||
|
@ -145,33 +145,34 @@ void MainObject::notificationReceivedData(RDNotification *notify)
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
|
||||
if(notify->type()==RDNotification::PypadType) {
|
||||
syslog(LOG_NOTICE,"NOTIFY: %s",(const char *)notify->write().toUtf8());
|
||||
if(notify->type()==RDNotification::PypadType) {
|
||||
int id=notify->id().toUInt();
|
||||
sql=QString("select SCRIPT_PATH from PYPAD_INSTANCES where ")+
|
||||
QString().sprintf("ID=%u && ",id)+
|
||||
"STATION_NAME=\""+RDEscapeString(rda->station()->name())+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
switch(notify->action()) {
|
||||
case RDNotification::AddAction:
|
||||
switch(notify->action()) {
|
||||
case RDNotification::AddAction:
|
||||
sql=QString("select SCRIPT_PATH from PYPAD_INSTANCES where ")+
|
||||
QString().sprintf("ID=%u && ",id)+
|
||||
"STATION_NAME=\""+RDEscapeString(rda->station()->name())+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
if(q->first()) {
|
||||
StartScript(id,q->value(0).toString());
|
||||
break;
|
||||
|
||||
case RDNotification::DeleteAction:
|
||||
pad_instances.value(id)->setPrivateData((void *)true); // No Restart
|
||||
KillScript(id);
|
||||
break;
|
||||
|
||||
case RDNotification::ModifyAction:
|
||||
KillScript(id);
|
||||
break;
|
||||
|
||||
case RDNotification::NoAction:
|
||||
case RDNotification::LastAction:
|
||||
break;
|
||||
}
|
||||
delete q;
|
||||
break;
|
||||
|
||||
case RDNotification::DeleteAction:
|
||||
pad_instances.value(id)->setPrivateData((void *)true); // No Restart
|
||||
KillScript(id);
|
||||
break;
|
||||
|
||||
case RDNotification::ModifyAction:
|
||||
KillScript(id);
|
||||
break;
|
||||
|
||||
case RDNotification::NoAction:
|
||||
case RDNotification::LastAction:
|
||||
break;
|
||||
}
|
||||
delete q;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user