From 01dac4f074301097d10abb6130eb68f99f56a1b9 Mon Sep 17 00:00:00 2001 From: Samuel Mendoza-Jonas Date: Fri, 29 Aug 2014 14:03:16 +1000 Subject: discover: Reject ADD_URL actions without configured network Signed-off-by: Samuel Mendoza-Jonas Signed-off-by: Jeremy Kerr --- discover/device-handler.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'discover') 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; -- cgit v1.1