Add error message for network and device storing failures
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 13 Apr 2009 13:54:52 +0000 (15:54 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 13 Apr 2009 13:54:52 +0000 (15:54 +0200)
src/device.c
src/network.c

index e36aa6d..bb9abf5 100644 (file)
@@ -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);
index 85b601d..f5e512e 100644 (file)
@@ -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);