From d9b6aadf66655a6713bcacb25d2ea6b01c07e3b5 Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Thu, 10 Jun 2021 17:28:11 +0200 Subject: #915 Revert filtering actions by id to "sesion" in og_dbi_queue_command Commit 141b079 introduced a slight change in how rows from table "acciones" are filtered when queuing a command, from "sesion" column to "idaccion" column. This seemed reasonable, as id column is the one autoincrementing. But remotepc queued commands inserting actions id using a timestamp instead of the action row id. See https://github.com/opengnsys/OpenGnsys/blob/c17ffa5d032a82e8eca61481dd8a8adb8b3fc5b1/admin/WebConsole/rest/remotepc.php#L188 Revert said change as long as remotepc keeps such behavior. --- src/rest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rest.c b/src/rest.c index 9c5d934..3eb936d 100644 --- a/src/rest.c +++ b/src/rest.c @@ -2979,7 +2979,7 @@ static int og_dbi_queue_command(struct og_dbi *dbi, uint32_t task_id, result = dbi_conn_queryf(dbi->conn, "SELECT idaccion, idcentro, idordenador, parametros " "FROM acciones " - "WHERE idaccion = %u", task_id); + "WHERE sesion = %u", task_id); if (!result) { dbi_conn_error(dbi->conn, &msglog); syslog(LOG_ERR, "failed to query database (%s:%d) %s\n", -- cgit v1.2.3-18-g5258