discover: Add support for 'add-url' actions
authorSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Thu, 24 Jul 2014 05:05:38 +0000 (15:05 +1000)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 28 Jul 2014 08:03:39 +0000 (16:03 +0800)
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/discover-server.c

index 80919fdf3da68088f20f7bca696efa1a5c39e6aa..e4f3b67767a0ed08ee1fffda3bc7147b6c137a4b 100644 (file)
@@ -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;