mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-28 23:46:59 +01: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:
@@ -18214,3 +18214,6 @@
|
|||||||
* Added a 'PYPAD_INSTANCES.EXIT_CODE' field to the database.
|
* Added a 'PYPAD_INSTANCES.EXIT_CODE' field to the database.
|
||||||
* Added a 'PYPAD_INSTANCES.ERROR_TEXT' field to the database.
|
* Added a 'PYPAD_INSTANCES.ERROR_TEXT' field to the database.
|
||||||
* Incremented the database version to 304.
|
* 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;
|
QString sql;
|
||||||
RDSqlQuery *q;
|
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();
|
int id=notify->id().toUInt();
|
||||||
sql=QString("select SCRIPT_PATH from PYPAD_INSTANCES where ")+
|
switch(notify->action()) {
|
||||||
QString().sprintf("ID=%u && ",id)+
|
case RDNotification::AddAction:
|
||||||
"STATION_NAME=\""+RDEscapeString(rda->station()->name())+"\"";
|
sql=QString("select SCRIPT_PATH from PYPAD_INSTANCES where ")+
|
||||||
q=new RDSqlQuery(sql);
|
QString().sprintf("ID=%u && ",id)+
|
||||||
while(q->next()) {
|
"STATION_NAME=\""+RDEscapeString(rda->station()->name())+"\"";
|
||||||
switch(notify->action()) {
|
q=new RDSqlQuery(sql);
|
||||||
case RDNotification::AddAction:
|
if(q->first()) {
|
||||||
StartScript(id,q->value(0).toString());
|
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user