summaryrefslogtreecommitdiffstats
path: root/discover/device-handler.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2014-07-28 10:09:49 +0800
committerJeremy Kerr <jk@ozlabs.org>2014-07-28 11:52:54 +0800
commita81a91f363acefed2f19309383877c02ff6389ef (patch)
tree75edac211504d3b7e21ec37c39e9d8a89973a2ca /discover/device-handler.c
parent896dbe80f08b4770a7253511a4eb38814d0d7d6b (diff)
downloadtalos-petitboot-a81a91f363acefed2f19309383877c02ff6389ef.tar.gz
talos-petitboot-a81a91f363acefed2f19309383877c02ff6389ef.zip
discover: Only update our config if the config_set succeeded.
If config_set fails, we don't want to send the failed config out to clients. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/device-handler.c')
-rw-r--r--discover/device-handler.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/discover/device-handler.c b/discover/device-handler.c
index e4978fa..22866e6 100644
--- a/discover/device-handler.c
+++ b/discover/device-handler.c
@@ -817,7 +817,12 @@ void device_handler_cancel_default(struct device_handler *handler)
void device_handler_update_config(struct device_handler *handler,
struct config *config)
{
- config_set(config);
+ int rc;
+
+ rc = config_set(config);
+ if (rc)
+ return;
+
discover_server_notify_config(handler->server, config);
device_handler_reinit(handler);
}
OpenPOWER on IntegriCloud