summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2021-06-10 17:28:11 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-06-10 17:36:51 +0200
commitd9b6aadf66655a6713bcacb25d2ea6b01c07e3b5 (patch)
tree0dfa4100b24e296bb8e75556280452afd28afe75 /src
parent87774ab087a55b9347acc0f89a38df408f209fb9 (diff)
#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.
Diffstat (limited to 'src')
-rw-r--r--src/rest.c2
1 files changed, 1 insertions, 1 deletions
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",