From: Samuel Mendoza-Jonas Date: Fri, 29 Aug 2014 04:03:16 +0000 (+1000) Subject: discover: Reject ADD_URL actions without configured network X-Git-Tag: v1.0.0~116 X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=commitdiff_plain;h=01dac4f074301097d10abb6130eb68f99f56a1b9 discover: Reject ADD_URL actions without configured network Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: Jeremy Kerr --- diff --git a/discover/device-handler.c b/discover/device-handler.c index 2164b22..120f11f 100644 --- a/discover/device-handler.c +++ b/discover/device-handler.c @@ -923,6 +923,12 @@ void device_handler_process_url(struct device_handler *handler, status->detail = talloc_asprintf(status, _("Received config URL %s"), url); + if (!handler->network) { + status->message = talloc_asprintf(handler, + _("No network configured")); + goto msg; + } + event = talloc(handler, struct event); event->type = EVENT_TYPE_USER; event->action = EVENT_ACTION_CONF; diff --git a/po/en.po b/po/en.po index edcbe7a..691722d 100644 --- a/po/en.po +++ b/po/en.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: petitboot 20140623-g89bd2ed2-dirty\n" "Report-Msgid-Bugs-To: Geoff Levand \n" -"POT-Creation-Date: 2014-08-22 11:12+1000\n" +"POT-Creation-Date: 2014-08-29 13:24+1000\n" "PO-Revision-Date: 2014-06-24 13:56+0800\n" "Last-Translator: Jeremy Kerr \n" "Language-Team: English\n" @@ -63,6 +63,9 @@ msgstr "Default boot cancelled" msgid "Received config URL %s" msgstr "Received config URL %s" +msgid "No network configured" +msgstr "No network configured" + msgid "Invalid config URL!" msgstr "Invalid config URL!"