diff options
author | Ramón M. Gómez <ramongomez@us.es> | 2019-10-24 14:03:43 +0200 |
---|---|---|
committer | Ramón M. Gómez <ramongomez@us.es> | 2019-10-24 14:03:43 +0200 |
commit | 90da353673e50372fb29e1d134db4a25be7d97a9 (patch) | |
tree | e0500588c48eeef51b0b2db97a8e11223706bc1f | |
parent | 31eaff25782d2a09cdb7c7cad29088b50c50e5f1 (diff) |
#839: Drop database event when remote access reservation is finished.
-rw-r--r-- | admin/WebConsole/rest/remotepc.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/admin/WebConsole/rest/remotepc.php b/admin/WebConsole/rest/remotepc.php index 08f889ed..c6dcda51 100644 --- a/admin/WebConsole/rest/remotepc.php +++ b/admin/WebConsole/rest/remotepc.php @@ -501,8 +501,8 @@ EOD; // Read query data. $clntip = $rs->campos["ip"]; $agentkey = $rs->campos["agentkey"]; - // DB Transaction: set reservation time to the past and - // remove pending boot commands from client's and agent's queues. + // DB Transaction: set reservation time to the past, remove pending + // boot commands from client's and agent's queues, and drop its event. if ($app->settings['debug']) writeRemotepcLog($app->request()->getResourceUri(). ": Updating database."); $cmd->texto = "START TRANSACTION;"; @@ -524,6 +524,8 @@ DELETE FROM ogagent_queue WHERE clientid = '$clntid' AND command IN ('popup-10', 'popup-5', 'poweroff'); EOD; $cmd->Ejecutar(); + $cmd->texto = "DROP EVENT IF EXISTS e_timeout_$clntid;"; + $cmd->Ejecutar(); $cmd->texto = "COMMIT;"; $cmd->Ejecutar(); // Send a poweroff command to client's OGAgent. |