From f155a58a64c660e46e74123293482561b816a39a Mon Sep 17 00:00:00 2001 From: Nishanth Aravamudan Date: Wed, 19 Aug 2015 14:05:43 -0700 Subject: discover: extend URL in UI to support auto-discovery The URL field currently only supports loading a particular file for static network configurations. But it makes sense in certain static network configurations to 'auto-discover' a file like petitboot does with DHCP -- based off the MAC address and IP. Extend device_handler_process_url to take those as parameters, and toggle off the URL ending in a '/' to indicate whether to 'auto-discover' or directly load the specified URL. Signed-off-by: Nishanth Aravamudan Signed-off-by: Samuel Mendoza-Jonas --- discover/discover-server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'discover/discover-server.c') diff --git a/discover/discover-server.c b/discover/discover-server.c index e4f3b67..6806589 100644 --- a/discover/discover-server.c +++ b/discover/discover-server.c @@ -266,7 +266,8 @@ static int discover_server_process_message(void *arg) case PB_PROTOCOL_ACTION_ADD_URL: url = pb_protocol_deserialise_string((void *) client, message); - device_handler_process_url(client->server->device_handler, url); + device_handler_process_url(client->server->device_handler, + url, NULL, NULL); break; default: -- cgit v1.2.1