plugin: rescan restarts plugin on update

This adds a `u32 checksum` field to the plugin struct that is used
to identify if a plugin is outdated and needs to be restarted on `rescan`.

Note: Only affects non-important plugins.

Changelog-Added: Plugin: Restart plugin on `rescan` when binary was changed.
This commit is contained in:
Michael Schmoock
2021-06-17 17:17:41 +02:00
committed by neil saitug
parent 0f18f203e2
commit ec9693863d
2 changed files with 22 additions and 3 deletions

View File

@@ -48,6 +48,7 @@ struct plugin {
pid_t pid;
char *cmd;
u32 checksum;
struct io_conn *stdin_conn, *stdout_conn;
struct plugins *plugins;
const char **plugin_path;