diff mbox series

discover: Display warning if saving config fails

Message ID 20181129021255.32632-1-sam@mendozajonas.com
State Accepted
Headers show
Series discover: Display warning if saving config fails | expand

Commit Message

Sam Mendoza-Jonas Nov. 29, 2018, 2:12 a.m. UTC
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
---
 discover/device-handler.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Sam Mendoza-Jonas Dec. 3, 2018, 5:24 a.m. UTC | #1
On Thu, 2018-11-29 at 13:12 +1100, Samuel Mendoza-Jonas wrote:
> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>

Merged as c8769182

> ---
>  discover/device-handler.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/discover/device-handler.c b/discover/device-handler.c
> index 271b9880..729ed2c0 100644
> --- a/discover/device-handler.c
> +++ b/discover/device-handler.c
> @@ -1501,8 +1501,11 @@ void device_handler_update_config(struct device_handler *handler,
>  	int rc;
>  
>  	rc = config_set(config);
> -	if (rc)
> +	if (rc) {
> +		device_handler_status_err(handler,
> +				"Failed to update configuration!");
>  		return;
> +	}
>  
>  	discover_server_notify_config(handler->server, config);
>  	device_handler_update_lang(config->lang);
diff mbox series

Patch

diff --git a/discover/device-handler.c b/discover/device-handler.c
index 271b9880..729ed2c0 100644
--- a/discover/device-handler.c
+++ b/discover/device-handler.c
@@ -1501,8 +1501,11 @@  void device_handler_update_config(struct device_handler *handler,
 	int rc;
 
 	rc = config_set(config);
-	if (rc)
+	if (rc) {
+		device_handler_status_err(handler,
+				"Failed to update configuration!");
 		return;
+	}
 
 	discover_server_notify_config(handler->server, config);
 	device_handler_update_lang(config->lang);