summaryrefslogtreecommitdiffstats
path: root/src/rest.c
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2021-09-06 10:24:19 +0000
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-09-06 12:32:38 +0200
commit2d68f8a0ec04b1f7700dce6bc0635c3bce516453 (patch)
tree65e39c982a2f0d604d10a1117a8d22b80a4b8c26 /src/rest.c
parent5558fbcf0b5be8a8f90e5b3609ae62dc7c27f84e (diff)
#1061 add timeout to pending scheduled commands
Pending schedule commands can deny ogLive boot of clients due to filling of pending cmd queue with commands such as "Iniciar Sesión". For example: Using RemotePC to serve clients that do not boot into ogLive will fill up the pending command queue with "Iniciar Sesión". Introduce a safety timeout for pending (scheduled) commands to avoid this situation.
Diffstat (limited to 'src/rest.c')
-rw-r--r--src/rest.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rest.c b/src/rest.c
index 41738ea..0835f68 100644
--- a/src/rest.c
+++ b/src/rest.c
@@ -2323,6 +2323,7 @@ static void og_cmd_init(struct og_cmd *cmd, enum og_rest_method method,
cmd->params.ips_array[0] = strdup(cmd->ip);
cmd->params.ips_array_len = 1;
cmd->json = root;
+ gettimeofday(&cmd->tv, NULL);
}
static int og_cmd_legacy_wol(const char *input, struct og_cmd *cmd)