summaryrefslogtreecommitdiffstats
path: root/discover/discover-server.c
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>2014-07-24 15:05:38 +1000
committerJeremy Kerr <jk@ozlabs.org>2014-07-28 16:03:39 +0800
commit0f5d4481891467000c50bf14548c236cfb3e70ad (patch)
tree453bcd89d71b3614ff08052385d0ec896f9c59f1 /discover/discover-server.c
parente79f9f88f59ad3b8a9cf85a37b6c64095b2af0c3 (diff)
downloadtalos-petitboot-0f5d4481891467000c50bf14548c236cfb3e70ad.tar.gz
talos-petitboot-0f5d4481891467000c50bf14548c236cfb3e70ad.zip
discover: Add support for 'add-url' actions
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/discover-server.c')
-rw-r--r--discover/discover-server.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/discover/discover-server.c b/discover/discover-server.c
index 80919fd..e4f3b67 100644
--- a/discover/discover-server.c
+++ b/discover/discover-server.c
@@ -216,6 +216,7 @@ static int discover_server_process_message(void *arg)
struct boot_command *boot_command;
struct client *client = arg;
struct config *config;
+ char *url;
int rc;
message = pb_protocol_read_message(client, client->fd);
@@ -262,6 +263,12 @@ static int discover_server_process_message(void *arg)
config);
break;
+ case PB_PROTOCOL_ACTION_ADD_URL:
+ url = pb_protocol_deserialise_string((void *) client, message);
+
+ device_handler_process_url(client->server->device_handler, url);
+ break;
+
default:
pb_log("%s: invalid action %d\n", __func__, message->action);
return 0;
OpenPOWER on IntegriCloud