summaryrefslogtreecommitdiffstats
path: root/discover/discover-server.c
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2017-06-16 15:09:55 +1000
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2017-08-15 13:38:17 +1000
commit37feda62bd2835eabc779d275301a9b763521f7a (patch)
tree6a92baf2ea721f2bc55551f16c9f5651ed83949c /discover/discover-server.c
parentff54a215f0ce4c25262b24038841b58274cc51d3 (diff)
downloadtalos-petitboot-37feda62bd2835eabc779d275301a9b763521f7a.tar.gz
talos-petitboot-37feda62bd2835eabc779d275301a9b763521f7a.zip
discover: Handle plugin install request
Handle "_PLUGIN_INSTALL" requests from clients. Calling the pb-plugin script from pb-discover ensures different clients don't trip over each other. Successfully installed plugins are automatically communicated back to clients once pb-plugin sends a 'plugin' user event. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover/discover-server.c')
-rw-r--r--discover/discover-server.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/discover/discover-server.c b/discover/discover-server.c
index e2e87ca..57cf3b7 100644
--- a/discover/discover-server.c
+++ b/discover/discover-server.c
@@ -304,6 +304,12 @@ static int discover_server_process_message(void *arg)
url, NULL, NULL);
break;
+ case PB_PROTOCOL_ACTION_PLUGIN_INSTALL:
+ url = pb_protocol_deserialise_string((void *) client, message);
+
+ device_handler_install_plugin(client->server->device_handler,
+ url);
+ break;
default:
pb_log("%s: invalid action %d\n", __func__, message->action);
return 0;
OpenPOWER on IntegriCloud