summaryrefslogtreecommitdiff
path: root/resource.h
diff options
context:
space:
mode:
authorRussell King <rmk@armlinux.org.uk>2021-09-11 13:57:42 +0100
committerRussell King <rmk@armlinux.org.uk>2021-09-11 13:57:42 +0100
commit2f45bcf78b77193ad6107fbb92ad0f93eb1ad4fc (patch)
tree18b115356a92e67e2276a2dbe97139d2237c0f24 /resource.h
parentacc52e700121120726b42a6dadd8c12f030ba349 (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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/resource.h b/resource.h
index c3a1907..657397b 100644
--- a/resource.h
+++ b/resource.h
@@ -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;
};