From 37feda62bd2835eabc779d275301a9b763521f7a Mon Sep 17 00:00:00 2001 From: Samuel Mendoza-Jonas Date: Fri, 16 Jun 2017 15:09:55 +1000 Subject: 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 --- discover/discover-server.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'discover/discover-server.c') 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; -- cgit v1.2.1