summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-04-13 15:54:52 +0200
committerMarcel Holtmann <marcel@holtmann.org>2009-04-13 15:54:52 +0200
commit81d9a32d97f33764969acc5e39a80ad9836ec6b7 (patch)
treee6b1dea46e30cab543096cbfe7b059e7b81f6289
parent7f8a4d27747012b3d3c5ec85b2cbff4892dc9fa4 (diff)
downloadconnman-81d9a32d97f33764969acc5e39a80ad9836ec6b7.tar.gz
connman-81d9a32d97f33764969acc5e39a80ad9836ec6b7.tar.bz2
connman-81d9a32d97f33764969acc5e39a80ad9836ec6b7.zip
Add error message for network and device storing failures
-rw-r--r--src/device.c3
-rw-r--r--src/network.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/device.c b/src/device.c
index e36aa6db..bb9abf5f 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 85b601df..f5e512e9 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);