diff options
author | Russell King <rmk@armlinux.org.uk> | 2021-09-11 13:57:42 +0100 |
---|---|---|
committer | Russell King <rmk@armlinux.org.uk> | 2021-09-11 13:57:42 +0100 |
commit | 2f45bcf78b77193ad6107fbb92ad0f93eb1ad4fc (patch) | |
tree | 18b115356a92e67e2276a2dbe97139d2237c0f24 /resource.h | |
parent | acc52e700121120726b42a6dadd8c12f030ba349 (diff) |
Restrict updates to the newest updater
Prevent old update connections from providing updates, closing them if
they attempt an update.
In doing so, this also limits resource usage when we have multiple
updaters connected (which should never happen.)
Signed-off-by: Russell King <rmk@armlinux.org.uk>
Diffstat (limited to 'resource.h')
-rw-r--r-- | resource.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -9,11 +9,14 @@ struct resource; struct resource_ops { int (*get)(struct client *c, struct resource *r); void (*close)(struct client *c, struct resource *r); + void (*update_open)(struct client *c, struct resource *r); int (*update)(struct client *c, struct resource *r, const char *m); + void (*update_close)(struct client *c, struct resource *r); }; struct resource { const struct resource_ops *ops; + struct client *updater; void *data; }; |