From 66ba6d045e02db4654dcd9dd25c5780179f57875 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Fri, 11 Jun 2021 10:17:27 +0200 Subject: #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. --- src/rest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", -- cgit v1.2.3-18-g5258