diff options
author | jy910.yun <jy910.yun@samsung.com> | 2013-10-02 21:24:04 +0900 |
---|---|---|
committer | Lukasz Stelmach <l.stelmach@samsung.com> | 2013-10-10 02:26:07 -0700 |
commit | 3b911306adbda98eb7693249dc9a434808602fb1 (patch) | |
tree | 37dffd568ebeb191c517423c8eada384f90926ef | |
parent | c69625b8c85ade044959d5385f70ba4823d1b217 (diff) | |
download | libsvi-3b911306adbda98eb7693249dc9a434808602fb1.tar.gz libsvi-3b911306adbda98eb7693249dc9a434808602fb1.tar.bz2 libsvi-3b911306adbda98eb7693249dc9a434808602fb1.zip |
Change the logging macros and log level to warning from error
Change-Id: I77844db70e5ebae07722a701be82a196cd2dff52
Signed-off-by: jy910.yun <jy910.yun@samsung.com>
-rw-r--r-- | include/log.h | 10 | ||||
-rw-r--r-- | src/devices.c | 4 | ||||
-rw-r--r-- | src/feedback.c | 34 | ||||
-rw-r--r-- | src/sound.c | 46 | ||||
-rw-r--r-- | src/vibrator.c | 52 | ||||
-rw-r--r-- | src/xmlparser.c | 12 |
6 files changed, 80 insertions, 78 deletions
diff --git a/include/log.h b/include/log.h index 7237f82..d07bb81 100644 --- a/include/log.h +++ b/include/log.h @@ -24,11 +24,13 @@ #ifdef FEATURE_FEEDBACK_DLOG #define LOG_TAG "FEEDBACK" #include <dlog.h> - #define FEEDBACK_LOG(fmt, args...) SLOGD(fmt, ##args) - #define FEEDBACK_ERROR(fmt, args...) SLOGE(fmt, ##args) + #define _D(fmt, args...) SLOGD(fmt, ##args) + #define _W(fmt, args...) SLOGW(fmt, ##args) + #define _E(fmt, args...) SLOGE(fmt, ##args) #else - #define FEEDBACK_LOG(x, ...) - #define FEEDBACK_ERROR(x, ...) + #define _D(x, ...) + #define _W(x, ...) + #define _E(x, ...) #endif #endif //__LOG_H__ diff --git a/src/devices.c b/src/devices.c index 970de55..f87fcb1 100644 --- a/src/devices.c +++ b/src/devices.c @@ -64,7 +64,7 @@ void devices_init(void) const struct device_ops *dev; DD_LIST_FOREACH(dev_head, elem, dev) { - FEEDBACK_LOG("[%s] initialize", str_type[dev->type]); + _D("[%s] initialize", str_type[dev->type]); if (dev->init) dev->init(); } @@ -76,7 +76,7 @@ void devices_exit(void) const struct device_ops *dev; DD_LIST_FOREACH(dev_head, elem, dev) { - FEEDBACK_LOG("[%s] deinitialize", str_type[dev->type]); + _D("[%s] deinitialize", str_type[dev->type]); if (dev->exit) dev->exit(); } diff --git a/src/feedback.c b/src/feedback.c index 5243924..6cebbb6 100644 --- a/src/feedback.c +++ b/src/feedback.c @@ -67,7 +67,7 @@ API int feedback_initialize() /* check call status */ if (vconf_get_int(VCONFKEY_CALL_STATE, &callstatus) < 0) - FEEDBACK_ERROR("vconf_get_int(VCONFKEY_CALL_STATE, &callstatus) ==> FAIL!!"); + _W("VCONFKEY_CALL_STATE ==> FAIL!!"); /* add watch for status value */ vconf_notify_key_changed(VCONFKEY_CALL_STATE, feedback_callstatus_cb, NULL); @@ -97,24 +97,24 @@ API int feedback_play(feedback_pattern_e pattern) { /* check initialize */ if (!binit) { - FEEDBACK_ERROR("Not initialized"); + _E("Not initialized"); return FEEDBACK_ERROR_NOT_INITIALIZED; } if (pattern < FEEDBACK_PATTERN_NONE || pattern >= FEEDBACK_PATTERN_END) { - FEEDBACK_ERROR("Invalid parameter : pattern(%d)", pattern); + _E("Invalid parameter : pattern(%d)", pattern); return FEEDBACK_ERROR_INVALID_PARAMETER; } if (pattern == FEEDBACK_PATTERN_NONE) { - FEEDBACK_LOG("pattern is NONE"); + _D("pattern is NONE"); return FEEDBACK_ERROR_NONE; } /* in case of call connected or connecting */ if (callstatus != VCONFKEY_CALL_OFF) { pattern = get_alert_on_call_key(pattern); - FEEDBACK_LOG("Call status is connected or connecting. pattern changed : %s", str_pattern[pattern]); + _D("Call status is connected or connecting. pattern changed : %s", str_pattern[pattern]); } /* play all device */ @@ -130,29 +130,29 @@ API int feedback_play_type(feedback_type_e type, feedback_pattern_e pattern) /* check initialize */ if (!binit) { - FEEDBACK_ERROR("Not initialized"); + _E("Not initialized"); return FEEDBACK_ERROR_NOT_INITIALIZED; } if (type <= FEEDBACK_TYPE_NONE || type >= FEEDBACK_TYPE_END) { - FEEDBACK_ERROR("Invalid parameter : type(%d)", type); + _E("Invalid parameter : type(%d)", type); return FEEDBACK_ERROR_INVALID_PARAMETER; } if (pattern < FEEDBACK_PATTERN_NONE || pattern >= FEEDBACK_PATTERN_END) { - FEEDBACK_ERROR("Invalid parameter : pattern(%d)", pattern); + _E("Invalid parameter : pattern(%d)", pattern); return FEEDBACK_ERROR_INVALID_PARAMETER; } if (pattern == FEEDBACK_PATTERN_NONE) { - FEEDBACK_LOG("pattern is NONE"); + _D("pattern is NONE"); return FEEDBACK_ERROR_NONE; } /* in case of call connected or connecting */ if (callstatus != VCONFKEY_CALL_OFF) { pattern = get_alert_on_call_key(pattern); - FEEDBACK_LOG("Call status is connected or connecting. pattern changed : %s", str_pattern[pattern]); + _D("Call status is connected or connecting. pattern changed : %s", str_pattern[pattern]); } /* play proper device */ @@ -160,7 +160,7 @@ API int feedback_play_type(feedback_type_e type, feedback_pattern_e pattern) if (dev) { err = dev->play(pattern); if (err < 0) - FEEDBACK_ERROR("fail to play sound"); + _E("fail to play sound"); } return FEEDBACK_ERROR_NONE; @@ -173,17 +173,17 @@ API int feedback_get_resource_path(feedback_type_e type, feedback_pattern_e patt int err; if (path == NULL) { - FEEDBACK_ERROR("Invalid parameter : path(NULL)"); + _E("Invalid parameter : path(NULL)"); return FEEDBACK_ERROR_INVALID_PARAMETER; } if (type <= FEEDBACK_TYPE_NONE || type >= FEEDBACK_TYPE_END) { - FEEDBACK_ERROR("Invalid parameter : type(%d)", type); + _E("Invalid parameter : type(%d)", type); return FEEDBACK_ERROR_INVALID_PARAMETER; } if (pattern <= FEEDBACK_PATTERN_NONE || pattern >= FEEDBACK_PATTERN_END) { - FEEDBACK_ERROR("Invalid parameter : pattern(%d)", pattern); + _E("Invalid parameter : pattern(%d)", pattern); return FEEDBACK_ERROR_INVALID_PARAMETER; } @@ -205,17 +205,17 @@ API int feedback_set_resource_path(feedback_type_e type, feedback_pattern_e patt int err; if (path == NULL) { - FEEDBACK_ERROR("Invalid parameter : path(NULL)"); + _E("Invalid parameter : path(NULL)"); return FEEDBACK_ERROR_INVALID_PARAMETER; } if (type <= FEEDBACK_TYPE_NONE || type >= FEEDBACK_TYPE_END) { - FEEDBACK_ERROR("Invalid parameter : type(%d)", type); + _E("Invalid parameter : type(%d)", type); return FEEDBACK_ERROR_INVALID_PARAMETER; } if (pattern <= FEEDBACK_PATTERN_NONE || pattern >= FEEDBACK_PATTERN_END) { - FEEDBACK_ERROR("Invalid parameter : pattern(%d)", pattern); + _E("Invalid parameter : pattern(%d)", pattern); return FEEDBACK_ERROR_INVALID_PARAMETER; } diff --git a/src/sound.c b/src/sound.c index d903e3a..3cefac7 100644 --- a/src/sound.c +++ b/src/sound.c @@ -177,15 +177,15 @@ static int change_symlink(const char *sym_path, const char *new_path) /* check symbolic link file existence */ if (stat(sym_path, &buf)) { - FEEDBACK_ERROR("file(%s) is not presents", sym_path); + _E("file(%s) is not presents", sym_path); return -EPERM; } if (unlink(sym_path) < 0) - FEEDBACK_LOG("unlink(%s) : %s", sym_path, strerror(errno)); + _D("unlink(%s) : %s", sym_path, strerror(errno)); if (symlink(new_path, sym_path) < 0) { - FEEDBACK_ERROR("symlink(%s) : %s", sym_path, strerror(errno)); + _E("symlink(%s) : %s", sym_path, strerror(errno)); return -EPERM; } @@ -202,17 +202,17 @@ static int restore_default_file(feedback_pattern_e pattern) cur_path = sound_file[pattern]; /* if there isn't cur_path, it already returns before calling this api */ if (cur_path == NULL || strlen(cur_path) == 0) { - FEEDBACK_ERROR("Invalid parameter : cur_path(NULL)"); + _E("Invalid parameter : cur_path(NULL)"); return -EPERM; } temp = strcat(default_path, FEEDBACK_ORIGIN_DATA_DIR); strcat(temp, cur_path+strlen(FEEDBACK_DATA_DIR)); - FEEDBACK_LOG("default_path : %s", default_path); + _D("default_path : %s", default_path); ret = change_symlink(cur_path, default_path); if (ret < 0) { - FEEDBACK_ERROR("change_symlink is failed"); + _E("change_symlink is failed"); return -EPERM; } @@ -223,13 +223,13 @@ static void sound_init(void) { /* Sound Init */ if (vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &sndstatus) < 0) - FEEDBACK_ERROR("vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &sndstatus) ==> FAIL!!"); + _W("VCONFKEY_SETAPPL_SOUND_STATUS_BOOL ==> FAIL!!"); if (vconf_get_bool(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, &touch_sndstatus) < 0) - FEEDBACK_ERROR("vconf_get_bool(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, &touch_sndstatus) ==> FAIL!!"); + _W("VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL ==> FAIL!!"); if (vconf_get_int(VCONFKEY_SOUND_STATUS, &soundon) < 0) - FEEDBACK_ERROR("vconf_get_int(VCONFKEY_SOUND_STATUS, &soundon) ==> FAIL!!"); + _W("VCONFKEY_SOUND_STATUS ==> FAIL!!"); /* add watch for status value */ vconf_notify_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, feedback_sndstatus_cb, NULL); @@ -251,42 +251,42 @@ static int sound_play(feedback_pattern_e pattern) int retry = FEEDBACK_RETRY_CNT, ret; if (sndstatus == 0 && !get_always_alert_case(pattern)) { - FEEDBACK_LOG("Sound condition is OFF (sndstatus : %d)", sndstatus); + _D("Sound condition is OFF (sndstatus : %d)", sndstatus); return 0; } if (soundon == 1 && pattern >= FEEDBACK_PATTERN_TAP && pattern <= FEEDBACK_PATTERN_HW_HOLD) { - FEEDBACK_LOG("Touch feedback sound doesn't work during playing sound"); + _D("Touch feedback sound doesn't work during playing sound"); return 0; } if (touch_sndstatus == 0 && pattern >= FEEDBACK_PATTERN_TAP && pattern <= FEEDBACK_PATTERN_HW_HOLD) { - FEEDBACK_LOG("Touch Sound condition is OFF and pattern is touch type (touch_sndstatus : %d, pattern : %s)", touch_sndstatus, str_pattern[pattern]); + _D("Touch Sound condition is OFF and pattern is touch type (touch_sndstatus : %d, pattern : %s)", touch_sndstatus, str_pattern[pattern]); return 0; } if (sound_file[pattern] == NULL) { - FEEDBACK_LOG("This case(%s) does not play sound", str_pattern[pattern]); + _D("This case(%s) does not play sound", str_pattern[pattern]); return 0; } if (stat(sound_file[pattern], &buf)) { - FEEDBACK_ERROR("%s is not presents", sound_file[pattern]); + _E("%s is not presents", sound_file[pattern]); ret = restore_default_file(pattern); if (ret < 0) { - FEEDBACK_ERROR("restore_default_file(%s) error", str_pattern[pattern]); + _E("restore_default_file(%s) error", str_pattern[pattern]); return -EPERM; } - FEEDBACK_LOG("%s is restored", sound_file[pattern]); + _D("%s is restored", sound_file[pattern]); } do { ret = mm_sound_play_keysound(sound_file[pattern], get_volume_type(pattern)); if (ret == MM_ERROR_NONE) { - FEEDBACK_LOG("Play success! SND filename is %s", sound_file[pattern]); + _D("Play success! SND filename is %s", sound_file[pattern]); return 0; } - FEEDBACK_ERROR("mm_sound_play_keysound() returned error(%d)", ret); + _E("mm_sound_play_keysound() returned error(%d)", ret); } while(retry--); return -EPERM; @@ -301,14 +301,14 @@ static int sound_get_path(feedback_pattern_e pattern, char *buf, unsigned int bu cur_path = sound_file[pattern]; if (cur_path == NULL) { - FEEDBACK_ERROR("This pattern(%s) in sound type is not supported to play", str_pattern[pattern]); + _E("This pattern(%s) in sound type is not supported to play", str_pattern[pattern]); snprintf(buf, buflen, "NULL"); return -ENOENT; } do { if(readlink(cur_path, buf, buflen) < 0) { - FEEDBACK_ERROR("readlink is failed : %s", strerror(errno)); + _E("readlink is failed : %s", strerror(errno)); return -EPERM; } } while(retry--); @@ -324,19 +324,19 @@ static int sound_set_path(feedback_pattern_e pattern, char *path) assert(path != NULL); if (access(path, F_OK) != 0) { - FEEDBACK_ERROR("Invalid parameter : path does not exist"); + _E("Invalid parameter : path does not exist"); return -ENOENT; } cur_path = sound_file[pattern]; if (cur_path == NULL) { - FEEDBACK_ERROR("This pattern(%s) in sound type is not supported to play", str_pattern[pattern]); + _E("This pattern(%s) in sound type is not supported to play", str_pattern[pattern]); return -ENOENT; } ret = change_symlink(cur_path, path); if (ret < 0) { - FEEDBACK_ERROR("change_symlink is failed"); + _E("change_symlink is failed"); return -EPERM; } diff --git a/src/vibrator.c b/src/vibrator.c index 2e8cfdf..bdbd7ec 100644 --- a/src/vibrator.c +++ b/src/vibrator.c @@ -169,12 +169,12 @@ static int get_haptic_level(feedback_pattern_e pattern) else level = vib_level; - FEEDBACK_LOG("Call status : %d, pattern : %s, level : %d", callstatus, str_pattern[pattern], level); + _D("Call status : %d, pattern : %s, level : %d", callstatus, str_pattern[pattern], level); if (callstatus != VCONFKEY_CALL_OFF) { // if call status is ON, vibration magnitude is 20% level = (int)(level*0.2f); level = (level < 1) ? 1 : level; - FEEDBACK_LOG("level changed : %d", level); + _D("level changed : %d", level); } level = level * 20; @@ -200,13 +200,13 @@ static int get_xml_data(xmlDocPtr doc, feedback_pattern_e pattern, struct xmlDat cur = xml_find(doc, (const xmlChar*)str_pattern[pattern]); if (cur == NULL) { - FEEDBACK_ERROR("xml_find fail"); + _E("xml_find fail"); return -1; } retData = xml_parse(doc, cur); if (retData == NULL) { - FEEDBACK_ERROR("xml_parse fail"); + _E("xml_parse fail"); return -1; } @@ -231,15 +231,15 @@ static int change_symlink(const char *sym_path, const char *new_path) /* check symbolic link file existence */ if (stat(sym_path, &buf)) { - FEEDBACK_ERROR("file(%s) is not presents", sym_path); + _E("file(%s) is not presents", sym_path); return -EPERM; } if (unlink(sym_path) < 0) - FEEDBACK_LOG("unlink(%s) : %s", sym_path, strerror(errno)); + _D("unlink(%s) : %s", sym_path, strerror(errno)); if (symlink(new_path, sym_path) < 0) { - FEEDBACK_ERROR("symlink(%s) : %s", sym_path, strerror(errno)); + _E("symlink(%s) : %s", sym_path, strerror(errno)); return -EPERM; } @@ -256,17 +256,17 @@ static int restore_default_file(feedback_pattern_e pattern) cur_path = haptic_file[pattern]; // if there isn't cur_path, it already returns before calling this api if (cur_path == NULL || strlen(cur_path) == 0) { - FEEDBACK_ERROR("Invalid parameter : cur_path(NULL)"); + _E("Invalid parameter : cur_path(NULL)"); return -EPERM; } temp = strcat(default_path, FEEDBACK_ORIGIN_DATA_DIR); strcat(temp, cur_path+strlen(FEEDBACK_DATA_DIR)); - FEEDBACK_LOG("default_path : %s", default_path); + _D("default_path : %s", default_path); ret = change_symlink(cur_path, default_path); if (ret < 0) { - FEEDBACK_ERROR("change_symlink is failed"); + _E("change_symlink is failed"); return -EPERM; } @@ -280,14 +280,14 @@ static void vibrator_init(void) /* xml Init */ v_doc = xml_open(VIBRATION_XML); if (v_doc == NULL) { - FEEDBACK_ERROR("xml_open(%s) fail", VIBRATION_XML); + _E("xml_open(%s) fail", VIBRATION_XML); return; } /* Vibration Init */ ret = haptic_open(HAPTIC_DEVICE_ALL, &v_handle); if (ret != HAPTIC_ERROR_NONE) { - FEEDBACK_ERROR("haptic_open(HAPTIC_DEVICE_ALL, &v_handle) ==> FAIL!! : %d", ret); + _E("haptic_open ==> FAIL!! : %d", ret); xml_close(v_doc); v_doc = NULL; return; @@ -295,15 +295,15 @@ static void vibrator_init(void) /* check vibration status */ if (vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vibstatus) < 0) - FEEDBACK_ERROR("vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vibstatus) ==> FAIL!!"); + _W("VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL ==> FAIL!!"); /* check vib_level */ if (vconf_get_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &vib_level) < 0) - FEEDBACK_ERROR("vconf_get_int(VCONFKEY_FEEDBACK_VIBRATION_LEVEL_INT, &vib_level) ==> FAIL!!"); + _W("VCONFKEY_FEEDBACK_VIBRATION_LEVEL_INT ==> FAIL!!"); /* check noti_level */ if (vconf_get_int(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, ¬i_level) < 0) - FEEDBACK_ERROR("vconf_get_int(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, ¬i_level) ==> FAIL!!"); + _W("VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT ==> FAIL!!"); /* add watch for status value */ vconf_notify_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, feedback_vibstatus_cb, NULL); @@ -323,7 +323,7 @@ static void vibrator_exit(void) if (v_handle) { ret = haptic_close(v_handle); if (ret != HAPTIC_ERROR_NONE) - FEEDBACK_ERROR("haptic_close is failed : %d", ret); + _E("haptic_close is failed : %d", ret); v_handle = NULL; } @@ -339,23 +339,23 @@ static int vibrator_play(feedback_pattern_e pattern) struct xmlData *data; if (!v_handle || !v_doc) { - FEEDBACK_ERROR("Not initialize"); + _E("Not initialize"); return -EPERM; } if (vibstatus == 0 && !get_always_alert_case(pattern)) { - FEEDBACK_LOG("Vibration condition is OFF (vibstatus : %d)", vibstatus); + _D("Vibration condition is OFF (vibstatus : %d)", vibstatus); return 0; } ret = get_xml_data(v_doc, pattern, &data); if (ret < 0) { - FEEDBACK_ERROR("feedback_get_vibration_data fail"); + _E("get_xml_data fail"); return -EPERM; } if (data->data == NULL) { - FEEDBACK_LOG("This case(%s) does not play vibration", str_pattern[pattern]); + _D("This case(%s) does not play vibration", str_pattern[pattern]); release_xml_data(data); return 0; } @@ -364,7 +364,7 @@ static int vibrator_play(feedback_pattern_e pattern) ret = haptic_vibrate_buffer_with_detail(v_handle, data->data, HAPTIC_ITERATION_ONCE, get_haptic_level(pattern), get_priority(pattern), NULL); if (ret != HAPTIC_ERROR_NONE) { - FEEDBACK_ERROR("haptic_vibrate_buffer_with_detail is failed"); + _E("haptic_vibrate_buffer_with_detail is failed"); release_xml_data(data); return -EPERM; } @@ -382,14 +382,14 @@ static int vibrator_get_path(feedback_pattern_e pattern, char *buf, unsigned int cur_path = haptic_file[pattern]; if (cur_path == NULL) { - FEEDBACK_ERROR("This pattern(%s) in vibrator type is not supported to play", str_pattern[pattern]); + _E("This pattern(%s) in vibrator type is not supported to play", str_pattern[pattern]); snprintf(buf, buflen, "NULL"); return -ENOENT; } do { if(readlink(cur_path, buf, buflen) < 0) { - FEEDBACK_ERROR("readlink is failed : %s", strerror(errno)); + _E("readlink is failed : %s", strerror(errno)); return -EPERM; } } while(retry--); @@ -405,19 +405,19 @@ static int vibrator_set_path(feedback_pattern_e pattern, char *path) assert(path != NULL); if (access(path, F_OK) != 0) { - FEEDBACK_ERROR("Invalid parameter : path does not exist"); + _E("Invalid parameter : path does not exist"); return -ENOENT; } cur_path = haptic_file[pattern]; if (cur_path == NULL) { - FEEDBACK_ERROR("This pattern(%s) in vibrator type is not supported to play", str_pattern[pattern]); + _E("This pattern(%s) in vibrator type is not supported to play", str_pattern[pattern]); return -ENOENT; } ret = change_symlink(cur_path, path); if (ret < 0) { - FEEDBACK_ERROR("change_symlink is failed"); + _E("change_symlink is failed"); return -EPERM; } diff --git a/src/xmlparser.c b/src/xmlparser.c index 39a7666..672d504 100644 --- a/src/xmlparser.c +++ b/src/xmlparser.c @@ -34,7 +34,7 @@ xmlDocPtr xml_open(const char *xml) doc = xmlReadFile(xml, NULL, 0); if (doc == NULL) { - FEEDBACK_ERROR("xmlReadFile fail"); + _E("xmlReadFile fail"); return NULL; } @@ -83,7 +83,7 @@ xmlNodePtr xml_find(xmlDocPtr doc, const xmlChar* expr) root = xmlDocGetRootElement(doc); if (root == NULL) { - FEEDBACK_ERROR("xmlDocGetRootElement fail"); + _E("xmlDocGetRootElement fail"); return NULL; } @@ -112,7 +112,7 @@ struct xmlData *xml_parse(xmlDocPtr doc, xmlNodePtr cur) data = (struct xmlData*)malloc(sizeof(struct xmlData)); if (data == NULL) { - FEEDBACK_ERROR("out of memory"); + _E("out of memory"); return NULL; } @@ -120,11 +120,11 @@ struct xmlData *xml_parse(xmlDocPtr doc, xmlNodePtr cur) for (node = cur->children; node != NULL; node = node->next) { if (!xmlStrcmp(node->name, (const xmlChar*)data_str[XML_LABEL])) { data->label = (char*)xmlNodeListGetString(doc, node->children, 1); - FEEDBACK_LOG("label : %s", data->label); + _D("label : %s", data->label); } else if (!xmlStrcmp(node->name, (const xmlChar*)data_str[XML_DATA])) { b64_data = (char *)xmlNodeListGetString(doc, node->children, 1); if (b64_data != NULL) { - FEEDBACK_LOG("b64_data : %s", b64_data); + _D("b64_data : %s", b64_data); data->data = g_base64_decode(b64_data, &len); xmlFree(b64_data); } @@ -143,7 +143,7 @@ int xml_save(xmlDocPtr doc, const char *path) r = xmlSaveFile(path, doc); if (r < 0) { - FEEDBACK_ERROR("xmlSaveFile fail"); + _E("xmlSaveFile fail"); return -1; } |