#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 d9b6aadf66.
master
Javier Sánchez Parra 2021-06-11 10:17:27 +02:00 committed by OpenGnSys Support Team
parent c03b87dcc6
commit 66ba6d045e
1 changed files with 1 additions and 1 deletions

View File

@ -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",