summaryrefslogtreecommitdiffstats
path: root/src/schedule.h
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2021-07-22 14:09:46 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-07-22 15:52:12 +0200
commit261d490c4e8ad9b6cee46e82a8ad029eeaf6cd6b (patch)
treeeef5c5974e3c33c26441da9b738b6e6d82fa5112 /src/schedule.h
parent33d8cecfe1ce64c517fe995875397b32e534bdb0 (diff)
#1052 Populate session column when adding actions
If the scope of a command, procedure or task is related to a group of computers then actions associated with that schedule can share the same session value. og_dbi_add_action was not initializing session value, as it is only used for visualization purposes in the legacy web interface. This patch enables og_dbi_add_action to populate session column by assigning it the id value of the first action related to the scope. Example: Power off command for a room scope of 4 clients will result in 4 actions, a power off for each client. The first action id will determine the session value for the rest.
Diffstat (limited to 'src/schedule.h')
-rw-r--r--src/schedule.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/schedule.h b/src/schedule.h
index 12c394c..69dbde9 100644
--- a/src/schedule.h
+++ b/src/schedule.h
@@ -55,6 +55,7 @@ struct og_task {
uint32_t center_id;
uint32_t schedule_id;
uint32_t type_scope;
+ uint32_t session;
uint32_t scope;
const char *filtered_scope;
const char *params;