Added some log for save/load keyfile 80/76180/1 accepted/tizen/common/20160623.154550 accepted/tizen/ivi/20160623.125259 accepted/tizen/mobile/20160623.125213 accepted/tizen/tv/20160623.125223 accepted/tizen/wearable/20160623.125243 submit/tizen/20160623.100245
authorhyunuktak <hyunuk.tak@samsung.com>
Thu, 23 Jun 2016 05:25:03 +0000 (14:25 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Thu, 23 Jun 2016 05:25:06 +0000 (14:25 +0900)
Change-Id: I7c03dc9e311754be3a243ce0e9d4db639c7718b6
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
packaging/net-config.spec
src/utils/util.c

index a5e0037..d491379 100755 (executable)
@@ -1,6 +1,6 @@
 Name:          net-config
 Summary:       TIZEN Network Configuration service
-Version:       1.1.77
+Version:       1.1.78
 Release:       2
 Group:         System/Network
 License:       Apache-2.0
index 336e6be..482b53c 100755 (executable)
@@ -62,6 +62,7 @@ GKeyFile *netconfig_keyfile_load(const char *pathname)
                keyfile = NULL;
        }
 
+       DBG("loaded keyfile %s", pathname);
        return keyfile;
 }
 
@@ -80,6 +81,7 @@ void netconfig_keyfile_save(GKeyFile *keyfile, const char *pathname)
 
        if (directory == NULL || (*directory) == '\0') {
                g_free(directory);
+               ERR("directory is NULL");
                return;
        }
 
@@ -87,6 +89,7 @@ void netconfig_keyfile_save(GKeyFile *keyfile, const char *pathname)
                if (g_mkdir_with_parents(directory,
                                S_IRUSR | S_IWUSR | S_IXUSR) != 0) {
                        g_free(directory);
+                       ERR("failed to make directory");
                        return;
                }
        }
@@ -94,11 +97,12 @@ void netconfig_keyfile_save(GKeyFile *keyfile, const char *pathname)
 
        keydata = g_key_file_to_data(keyfile, &size, &error);
        if (g_file_set_contents(pathname, keydata, size, &error) != TRUE) {
-               DBG("Unable to save %s, error %s", pathname, error->message);
+               ERR("Unable to save %s, error %s", pathname, error->message);
                g_error_free(error);
        }
 
        chmod(pathname, S_IRUSR | S_IWUSR);
+       DBG("Successfully saved keyfile %s", pathname);
 
        g_free(keydata);
 }