diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2021-06-11 10:17:27 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2021-06-16 12:16:37 +0200 |
commit | 66ba6d045e02db4654dcd9dd25c5780179f57875 (patch) | |
tree | 4aad06a38c6d93ce42e883ab01c83964b5e08581 /src/rest.c | |
parent | c03b87dcc6d78eefb77f7155160f92d20b6e9ea3 (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/rest.c')
-rw-r--r-- | src/rest.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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", |