From 81d9a32d97f33764969acc5e39a80ad9836ec6b7 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 13 Apr 2009 15:54:52 +0200 Subject: [PATCH] Add error message for network and device storing failures --- src/device.c | 3 ++- src/network.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/device.c b/src/device.c index e36aa6d..bb9abf5 100644 --- a/src/device.c +++ b/src/device.c @@ -1913,7 +1913,8 @@ update: data = g_key_file_to_data(keyfile, &length, NULL); - g_file_set_contents(pathname, data, length, NULL); + if (g_file_set_contents(pathname, data, length, NULL) == FALSE) + connman_error("Failed to store device information"); done: g_free(data); diff --git a/src/network.c b/src/network.c index 85b601d..f5e512e 100644 --- a/src/network.c +++ b/src/network.c @@ -1281,7 +1281,8 @@ update: data = g_key_file_to_data(keyfile, &length, NULL); - g_file_set_contents(pathname, data, length, NULL); + if (g_file_set_contents(pathname, data, length, NULL) == FALSE) + connman_error("Failed to store network information"); done: g_free(data); -- 1.7.9.5