From acac624818b245014ee39ef39617dc3639f43891 Mon Sep 17 00:00:00 2001 From: Jiwoong Im Date: Fri, 4 Mar 2016 15:24:54 +0900 Subject: [PATCH] vconf-compat : fix bug in setting last_result Change-Id: I90cf1c4c2f7aa4d98abdac9be6b3bad74b0ce718 Signed-off-by: Jiwoong Im --- vconf-compat/vconf.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/vconf-compat/vconf.c b/vconf-compat/vconf.c index 436c99a..89d3c55 100644 --- a/vconf-compat/vconf.c +++ b/vconf-compat/vconf.c @@ -518,9 +518,10 @@ EXPORT int vconf_set_int(const char *key, int intval) return -1; r = _vconf_set(key, val); + if (r == 0) + last_result = true; buxton_value_free(val); - last_result = true; return r; } @@ -541,9 +542,10 @@ EXPORT int vconf_set_bool(const char *key, int boolval) return -1; r = _vconf_set(key, val); + if (r == 0) + last_result = true; buxton_value_free(val); - last_result = true; return r; } @@ -564,9 +566,10 @@ EXPORT int vconf_set_str(const char *key, const char *strval) return -1; r = _vconf_set(key, val); + if (r == 0) + last_result = true; buxton_value_free(val); - last_result = true; return r; } @@ -587,9 +590,10 @@ EXPORT int vconf_set_dbl(const char *key, double dblval) return -1; r = _vconf_set(key, val); + if (r == 0) + last_result = true; buxton_value_free(val); - last_result = true; return r; } @@ -710,11 +714,12 @@ EXPORT char *vconf_get_str(const char *key) r = buxton_value_get_string(val, &s); if (r == -1) s = NULL; + else if (r == 0) + last_result = true; str = s ? strdup(s) : NULL; buxton_value_free(val); - last_result = true; return str; } -- 2.7.4