summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2021-06-11 10:17:27 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-06-16 12:16:37 +0200
commit66ba6d045e02db4654dcd9dd25c5780179f57875 (patch)
tree4aad06a38c6d93ce42e883ab01c83964b5e08581 /src
parentc03b87dcc6d78eefb77f7155160f92d20b6e9ea3 (diff)
#915 Filter queued commands by id
ogServer searches queued commands (formerly actions) in the DB by session. This can lead to problems because session is not an uniquely identifier but an identifier that several commands can share to group them. This commit changes query filter from session to id, ensuring correct results This reverts commit d9b6aadf66655a6713bcacb25d2ea6b01c07e3b5.
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 32f5cb3..e66d613 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 sesion = %u", task_id);
+ "WHERE idaccion = %u", task_id);
if (!result) {
dbi_conn_error(dbi->conn, &msglog);
syslog(LOG_ERR, "failed to query database (%s:%d) %s\n",