diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2020-05-13 15:44:28 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2020-06-02 12:32:36 +0200 |
commit | a63ec0ba7fa08b4f6e9c209d1f42e2d33366575a (patch) | |
tree | cc194b252471d4aee6369624e3f59a4435a916fe /sources/ogAdmServer.c | |
parent | 6c7d827904fb33d172d625ed10baadb9be342a22 (diff) |
#942 Fix immediate procedures
New versions of ogAdmServer handle pending commands in a different way.
Instant procedures uses the old way, now unsupported, so we need to
adapt instant procedures.
This commit adapts instant procedures to work with the new pending
commands implementation.
Diffstat (limited to 'sources/ogAdmServer.c')
-rw-r--r-- | sources/ogAdmServer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sources/ogAdmServer.c b/sources/ogAdmServer.c index 85d1968..7537931 100644 --- a/sources/ogAdmServer.c +++ b/sources/ogAdmServer.c @@ -3702,6 +3702,7 @@ void og_schedule_run(unsigned int task_id, unsigned int schedule_id, case OG_SCHEDULE_TASK: og_dbi_queue_task(dbi, task_id, schedule_id); break; + case OG_SCHEDULE_PROCEDURE: case OG_SCHEDULE_COMMAND: og_dbi_queue_command(dbi, task_id, schedule_id); break; @@ -3834,6 +3835,9 @@ static int og_dbi_schedule_create(struct og_dbi *dbi, case OG_SCHEDULE_TASK: type = 3; break; + case OG_SCHEDULE_PROCEDURE: + type = 2; + break; case OG_SCHEDULE_COMMAND: session = atoi(params->task_id); type = 1; @@ -4030,6 +4034,8 @@ static int og_task_schedule_create(struct og_msg_params *params) if (!strcmp(params->type, "task")) type = OG_SCHEDULE_TASK; + else if (!strcmp(params->type, "procedure")) + type = OG_SCHEDULE_PROCEDURE; else if (!strcmp(params->type, "command")) type = OG_SCHEDULE_COMMAND; else |