Add logic in failed case 67/149867/4
authorhhk86.heo <hhk86.heo@samsung.com>
Wed, 13 Sep 2017 10:03:25 +0000 (19:03 +0900)
committerheo hyungkang <hhk86.heo@samsung.com>
Thu, 14 Sep 2017 01:13:05 +0000 (01:13 +0000)
1. propergate when failed case in update
2. Add error log in failed case
3. Add enum of result property

Change-Id: I1d173adaf4fbbb83b174a24ba8c8bd788f7b9dc6

inc/fmwup_resource_internal.h
src/fmwup_resource.c
src/fmwup_resource_internal.c

index 27d568dfa93b52a0a206ca536bd3ee1502ae6fa6..b62f2ff7092be34bcbd9b9a8bea19b8e39105600 100644 (file)
@@ -62,7 +62,7 @@
 typedef struct {
        /* Update Property */
     int state;                                 //[R][M] fmwup_state_e - 0: Idle, 1: Downloading, 2: Downloaded, 3: Updating
-    int result;                                        //[R][M] 0: Initial, 1: Success, 2: Not enough space, 3: Out of ram, 4: Connection lost, 5: Invalid binary, 6: Invalid uri, 7: Update failed, 8: Unsupport protocol
+    int result;                                        //[R][M] 0: Initial, 1: Success, 2: Not enough space, 3: Out of ram, 4: Connection lost, 5: Invalid binary, 6: Invalid uri, 7: Update failed, 8: Unsupported protocol
     int update;                                        //[RW][M] 0: Initial, 1: Download Image, 2: Upgrade Image, 3:Dwonload and Upgrade, 4 Scheduled Upgrade
     int progress;                                      //[R][O] 0-100 range based progress include downloading state.
     int64_t update_time;                       //[RW][O] case of (4 – update) (scheduled)  TODO: ISO 8601
@@ -85,13 +85,24 @@ typedef struct {
     OCResourceHandle *resource_handle;
 } fmwup_s;
 
+typedef enum {
+       FMWUP_RESULT_INITIAL = 0,
+       FMWUP_RESULT_SUCCESS,
+       FMWUP_RESULT_NOT_ENOUGH_SPACE,
+       FMWUP_RESULT_OUT_OF_RAM,
+       FMWUP_RESULT_CONNECT_LOST,
+       FMWUP_RESULT_INVALID_BINARY,
+       FMWUP_RESULT_INVALID_URL,
+       FMWUP_RESULT_UPDATE_FAILED,
+       FMWUP_RESULT_UNSUPPORTED_PROTOCOL,
+}fmwup_result_property_e;
 
-enum {
-       FMWUP_EXEC_NONE = 0,
+typedef enum {
+       FMWUP_EXEC_IDLE = 0,
        FMWUP_EXEC_DOWNLOAD,
        FMWUP_EXEC_UPGRADE,
        FMWUP_EXEC_DOWNLOAD_AND_UPGRADE
-};
+}fmwup_update_property_e;
 
 typedef enum {
        FMWUP_HTTP_GET = 0,
@@ -108,6 +119,8 @@ void fmwup_get_firmware_info(fmwup_s *firmware_info);
 
 void fmwup_propagate_firmware_resource(void);
 
+void fmwup_propagate_firmware_status_resource(fmwup_update_property_e state, fmwup_result_property_e result);
+
 int fmwup_http_send_request(fmwup_http_req_e type, char *req_url, char **res_header, char **res_body);
 
 int fmwup_http_download_file(const char *download_url, const char *download_path);
index 84e5827a0b1bfa9a27bcef56dc730d3f93b0e16b..24e336807ec5b796e722628a3a0118bfea86bc51 100644 (file)
@@ -51,11 +51,14 @@ int fmwup_destory_firmware_resource(OCResourceHandle firmware_res_h)
                g_free(g_firmware_resource->current_version);
                g_free(g_firmware_resource->new_version);
                g_free(g_firmware_resource->package_uri);
+               g_free(g_firmware_resource->package_md5);
                g_free(g_firmware_resource->manufacturer);
                g_free(g_firmware_resource->model_name);
                g_free(g_firmware_resource);
 
                g_firmware_resource = NULL;
+       } else {
+               return FMWUP_INVALID_VALUE;
        }
 
        return FMWUP_SUCCESS;
@@ -64,7 +67,7 @@ int fmwup_destory_firmware_resource(OCResourceHandle firmware_res_h)
 int fmwup_set_firmware_download_path(const char *download_path)
 {
        if (!download_path)
-               return FMWUP_NULL_PTR;
+               return FMWUP_INVALID_VALUE;
 
        g_free(g_download_path);
        g_download_path = NULL;
@@ -94,7 +97,7 @@ void fmwup_unset_resource_changed_cb(void)
 int fmwup_get_newest_firmware_from_server()
 {
        if (!g_firmware_resource) {
-               FWR_LOGD("g_firmware_resource is NULL");
+               FWR_LOGE("g_firmware_resource is NULL");
                return FMWUP_NULL_PTR;
        }
 
@@ -108,7 +111,7 @@ int fmwup_get_newest_firmware_from_server()
 int fmwup_get_firmware_resource_value(fmwup_res_type_e res_type, char **value)
 {
        if (!g_firmware_resource) {
-               FWR_LOGD("g_firmware_resource is NULL");
+               FWR_LOGE("g_firmware_resource is NULL");
                return FMWUP_NULL_PTR;
        }
 
@@ -144,27 +147,18 @@ int fmwup_get_firmware_resource_value(fmwup_res_type_e res_type, char **value)
 int fmwup_check_firmware_upgraded(void)
 {
        if (!g_firmware_resource) {
-               FWR_LOGD("g_firmware_resource is NULL");
+               FWR_LOGE("g_firmware_resource is NULL");
                return FMWUP_NULL_PTR;
        }
 
        if (g_firmware_resource->state == FMWUP_STATE_UPDATING) {
                FWR_LOGD("***Firmware Upgrade Done***");
-               g_firmware_resource->state = FMWUP_STATE_IDLE;
 
                // TODO :: It should be checked and set result value according to upgrade result
-               g_firmware_resource->result = 1;
-
-               vconf_set_int(VCONF_FIRMWARE_UPDATE_STATE, (const int)g_firmware_resource->state);
-               vconf_set_int(VCONF_FIRMWARE_UPDATE_RESULT, (const int)g_firmware_resource->result);
+               fmwup_propagate_firmware_status_resource(FMWUP_STATE_IDLE, FMWUP_RESULT_SUCCESS);
 
-               fmwup_propagate_firmware_resource();
-
-               if (g_state_changed_cb) {
-                       g_state_changed_cb(g_firmware_resource->state);
-               }
        } else {
-
+               FWR_LOGE("is not updating, state[%d]", g_firmware_resource->state);
                return FMWUP_OPERATION_FAILED;
        }
 
index abf9bb82c149e459a22f95fa69a9a39a95120124..61a32981ba32d477571cfb25a2506d8352b83bb0 100644 (file)
@@ -79,7 +79,7 @@ OCEntityHandlerResult _check_request_payload(OCEntityHandlerRequest *ehRequest)
                        (ehRequest->query && (g_strcmp0(ehRequest->query, "") && \
                        !_compare_resource_interface(ehRequest->query, OC_RSRVD_INTERFACE_DEFAULT))))
        {
-               FWR_LOGD("Not supported Interface");
+               FWR_LOGE("Not supported Interface");
                return OC_EH_BAD_REQ;
        }
 
@@ -91,7 +91,7 @@ static void _exec_update()
 {
        FILE* fp = fopen(UPDATE_FILE, "w");
        if(!fp) {
-               FWR_LOGD("fopen error: %d", errno);
+               FWR_LOGE("fopen error: %d", errno);
                return;
        }
        fclose(fp);
@@ -106,115 +106,135 @@ void fmwup_propagate_firmware_resource(void)
 }
 
 
+void fmwup_propagate_firmware_status_resource(fmwup_update_property_e state, fmwup_result_property_e result)
+{
+
+       g_firmware_resource->state = state;
+       g_firmware_resource->result = result;
+
+       vconf_set_int(VCONF_FIRMWARE_UPDATE_STATE, (const int)g_firmware_resource->state);
+       vconf_set_int(VCONF_FIRMWARE_UPDATE_RESULT, (const int)g_firmware_resource->result);
+
+       fmwup_propagate_firmware_resource();
+
+       if (g_state_changed_cb) {
+               g_state_changed_cb(g_firmware_resource->state);
+       }
+
+       if (!(result == FMWUP_RESULT_INITIAL)) {
+               //init state, result in failed case
+               g_firmware_resource->state = FMWUP_EXEC_IDLE;
+               g_firmware_resource->result = FMWUP_RESULT_INITIAL;
+
+               vconf_set_int(VCONF_FIRMWARE_UPDATE_STATE, (const int)g_firmware_resource->state);
+               vconf_set_int(VCONF_FIRMWARE_UPDATE_RESULT, (const int)g_firmware_resource->result);
+
+               fmwup_propagate_firmware_resource();
+       }
+}
+
+
 void _handle_update_command(int64_t update_type)
 {
-       int result = 0;
-
-       if (g_strcmp0(g_firmware_resource->package_uri, "") && (
-                       (g_firmware_resource->state == 0 && update_type == FMWUP_EXEC_DOWNLOAD) ||
-                       (g_firmware_resource->state == 0 && update_type == FMWUP_EXEC_DOWNLOAD_AND_UPGRADE))) {
-               if (g_firmware_resource->new_version && \
-                               g_strcmp0(g_firmware_resource->current_version, g_firmware_resource->new_version)) {
-                       FWR_LOGD("***Downloading image from [%s] ***", g_firmware_resource->package_uri);
-                       g_firmware_resource->state = FMWUP_STATE_DOWNLOADING;
-                       g_firmware_resource->result = 0;
-                       fmwup_propagate_firmware_resource();
-                       if (g_state_changed_cb) {
-                               g_state_changed_cb(g_firmware_resource->state);
-                       }
+       int result = FMWUP_RESULT_INITIAL;
+#ifdef _USE_WWST_
+       char *res_header = NULL;
+       char *res_body = NULL;
+       char *request_uri = NULL;
+       char *sec_download_url = NULL;
+       char *download_path = NULL;
+#endif
+
+       if (g_strcmp0(g_firmware_resource->package_uri, "") == 0 ||
+                       g_strcmp0(g_firmware_resource->new_version, "") == 0 ||
+                       g_strcmp0(g_firmware_resource->current_version, g_firmware_resource->new_version) == 0)
+       {
+               FWR_LOGE("Invalid value, package_uri[%s], new_version[%s], current_version[%s]",
+                               g_firmware_resource->package_uri, g_firmware_resource->new_version, g_firmware_resource->current_version);
+               result = FMWUP_RESULT_UPDATE_FAILED;
+               goto _END_OF_FUNC_;
+       }
+
+
+       if ((g_firmware_resource->state == FMWUP_STATE_IDLE) && (update_type == FMWUP_EXEC_DOWNLOAD || update_type == FMWUP_EXEC_DOWNLOAD_AND_UPGRADE)) {
+               FWR_LOGD("***Downloading image from [%s] ***", g_firmware_resource->package_uri);
+               fmwup_propagate_firmware_status_resource(FMWUP_STATE_DOWNLOADING, FMWUP_RESULT_INITIAL);
 
 #ifdef _USE_WWST_
-                       char *res_header = NULL;
-                       char *res_body = NULL;
-//                     char *request_uri = g_strconcat(g_firmware_resource->package_uri, REST_API_DOWNLOAD_URL, CURRENT_VERSION,
-//                                     g_firmware_resource->current_version, TOKEN, TOKEN_KEY_TEMP, NULL);
-                       char *request_uri = g_strconcat(g_firmware_resource->package_uri, NULL);
 
-                       FWR_LOGI("request_uri[%s]", request_uri);
+               //request_uri = g_strconcat(g_firmware_resource->package_uri, REST_API_DOWNLOAD_URL, CURRENT_VERSION,
+               //                                      g_firmware_resource->current_version, TOKEN, TOKEN_KEY_TEMP, NULL);
+               request_uri = g_strconcat(g_firmware_resource->package_uri, NULL);
+               download_path = g_strconcat(g_download_path, FIRMWARE_FILE_NAME, NULL);
 
-                       if (fmwup_http_send_request(FMWUP_HTTP_GET, request_uri, &res_header, &res_body) != 0) {
-                               FWR_LOGE("cannot get Secure URL");
-                       } else {
-                               //parsing
-                               FWR_LOGI("res_header[%s]   res_body[%s]",res_header, res_body);
-
-                               char *sec_download_url = NULL;
-                               if (_parse_secure_url(res_body, &sec_download_url)) {
-
-                                       char *download_path = g_strconcat(g_download_path, FIRMWARE_FILE_NAME, NULL);
-                                       FWR_LOGI("download url[%s]  download path[%s]",sec_download_url, download_path);
-
-                                       if (fmwup_http_download_file(sec_download_url, (const char *)download_path) != 0) {
-                                               g_firmware_resource->state = FMWUP_STATE_IDLE;
-                                               vconf_set_int(VCONF_FIRMWARE_UPDATE_STATE, g_firmware_resource->state);
-                                               g_firmware_resource->result = 6;
-                                               vconf_set_int(VCONF_FIRMWARE_UPDATE_RESULT, g_firmware_resource->result);
-
-                                               fmwup_propagate_firmware_resource();
-                                               if (g_state_changed_cb) {
-                                                       g_state_changed_cb(g_firmware_resource->state);
-                                               }
-
-                                               g_free(download_path);
-                                               return;
-                                       }
-
-                                       g_free(download_path);
-                                       g_free(sec_download_url);
-                               } else {
-                                       FWR_LOGE("_parse_secure_url failed");
-                               }
-                       }
+               FWR_LOGI("request_uri[%s]", request_uri);
 
-                       g_free(request_uri);
+               if (fmwup_http_send_request(FMWUP_HTTP_GET, request_uri, &res_header, &res_body) != 0) {
+                       FWR_LOGE("cannot get Secure URL");
+                       result = FMWUP_RESULT_INVALID_URL;
+                       goto _END_OF_FUNC_;
+               } else {
+                       //parsing
+                       FWR_LOGI("res_header[%s]   res_body[%s]",res_header, res_body);
 
-#else
-                       if (fmwup_http_download_file(g_firmware_resource->package_uri, (const char *)g_download_path) != 0) {
-                               g_firmware_resource->state = FMWUP_STATE_IDLE;
-                               vconf_set_int(VCONF_FIRMWARE_UPDATE_STATE, g_firmware_resource->state);
-                               fmwup_propagate_firmware_resource();
-                               if (g_state_changed_cb) {
-                                       g_state_changed_cb(g_firmware_resource->state);
-                               }
-                               return;
-                       }
-#endif
+                       if (_parse_secure_url(res_body, &sec_download_url)) {
+                               FWR_LOGI("download url[%s]  download path[%s]",sec_download_url, download_path);
 
-                       FWR_LOGD("*** Firmware image downloaded ***");
-                       g_firmware_resource->state = FMWUP_STATE_DOWNLOADED;
-                       vconf_set_int(VCONF_FIRMWARE_UPDATE_STATE, g_firmware_resource->state);
+                               if (fmwup_http_download_file(sec_download_url, (const char *)download_path) != 0) {
+                                       FWR_LOGE("fmwup_http_download_file failed");
+                                       result = FMWUP_RESULT_INVALID_URL;
+                                       goto _END_OF_FUNC_;
+                               }
 
-                       fmwup_propagate_firmware_resource();
-                       if (g_state_changed_cb) {
-                               g_state_changed_cb(g_firmware_resource->state);
+                       } else {
+                               FWR_LOGE("_parse_secure_url failed");
+                               result = FMWUP_RESULT_INVALID_URL;
+                               goto _END_OF_FUNC_;
                        }
-               } else {
-                       /* LOG("No need to upgrade to new firmware [%s] from [%s]", \
-                               g_firmware_resource->new_version, g_firmware_resource->current_version); */
-                       return;
                }
+
+#else
+               if (fmwup_http_download_file(g_firmware_resource->package_uri, (const char *)g_download_path) != 0) {
+                       FWR_LOGE("fmwup_http_download_file failed");
+                       result = FMWUP_RESULT_INVALID_URL;
+                       goto _END_OF_FUNC_;
+               }
+#endif
+
+               FWR_LOGD("*** Firmware image downloaded ***");
+               fmwup_propagate_firmware_status_resource(FMWUP_STATE_DOWNLOADED, FMWUP_RESULT_INITIAL);
        }
 
-       if (g_firmware_resource->state == FMWUP_STATE_DOWNLOADED) {
-               if (update_type == FMWUP_EXEC_UPGRADE || update_type == FMWUP_EXEC_DOWNLOAD_AND_UPGRADE) {
-                       g_firmware_resource->state = FMWUP_STATE_UPDATING;
-                       vconf_set_int(VCONF_FIRMWARE_UPDATE_STATE, g_firmware_resource->state);
-                       fmwup_propagate_firmware_resource();
-                       if (g_state_changed_cb) {
-                               g_state_changed_cb(g_firmware_resource->state);
-                       }
+       if ((g_firmware_resource->state == FMWUP_STATE_DOWNLOADED) &&
+                       (update_type == FMWUP_EXEC_UPGRADE || update_type == FMWUP_EXEC_DOWNLOAD_AND_UPGRADE)) {
+               fmwup_propagate_firmware_status_resource(FMWUP_STATE_UPDATING, FMWUP_RESULT_INITIAL);
 
-                       _exec_update();
-               }
+               //TODO: To upgrade using interface of fota-client
+               _exec_update();
        }
+
+_END_OF_FUNC_:
+       if (result != FMWUP_RESULT_INITIAL) {
+               fmwup_propagate_firmware_status_resource(FMWUP_STATE_IDLE, result);
+       }
+
+#ifdef _USE_WWST_
+       g_free(res_header);
+       g_free(res_body);
+       g_free(download_path);
+       g_free(sec_download_url);
+       g_free(request_uri);
+#endif
+
+       return;
 }
 
 OCRepPayload* _construct_response_of_firmware()
 {
-       FWR_LOGD("_construct_response_of_firmware()");
+       FWR_ENTER
        OCRepPayload* payload = OCRepPayloadCreate();
        if (!payload) {
-               FWR_LOGD("Failed to allocate Payload");
+               FWR_LOGE("Failed to allocate Payload");
                return NULL;
        }
 
@@ -240,7 +260,7 @@ OCRepPayload* _construct_response_of_firmware()
 
        OCRepPayloadSetPropBool(payload, OC_RSRVD_FIRMWARE_ACTIVE_CHECK, g_firmware_resource->active_check);
 
-
+       FWR_EXIT
        return payload;
 }
 
@@ -262,25 +282,22 @@ void _update_firmware_resource(OCRepPayload *input)
                        g_free(g_firmware_resource->new_version);
                        g_firmware_resource->new_version = g_strdup(new_firmware);
                        vconf_set_str(VCONF_FIRMWARE_UPDATE_PACKAGE_NEW_VERSION, new_firmware);
-                       if (g_state_changed_cb) {
-                               g_state_changed_cb(g_firmware_resource->state);
-                       }
                }
                g_free(new_firmware);
-               FWR_LOGD("g_firmware_resource->new_version = [%s]", g_firmware_resource->new_version);
+               FWR_LOGI("g_firmware_resource->new_version = [%s]", g_firmware_resource->new_version);
 
                char *package_uri = NULL;
                if (OCRepPayloadGetPropString(input, OC_RSRVD_FIRMWARE_PACKAGE_URI, &package_uri)) {
-                       FWR_LOGD("g_firmware_resource->package_uri = [%s]", package_uri);
+                       FWR_LOGI("g_firmware_resource->package_uri = [%s]", package_uri);
                        if (g_strcmp0(package_uri, g_firmware_resource->package_uri)) {
                                g_free(g_firmware_resource->package_uri);
                                g_firmware_resource->package_uri = g_strdup(package_uri);
                                vconf_set_str(VCONF_FIRMWARE_UPDATE_PACKAGE_URL, package_uri);
                        }
                        g_free(package_uri);
-                       FWR_LOGD("g_firmware_resource->package_uri = [%s]", g_firmware_resource->package_uri);
+                       FWR_LOGI("g_firmware_resource->package_uri = [%s]", g_firmware_resource->package_uri);
                } else {
-                       FWR_LOGE("package uri none");
+                       FWR_LOGE("package_uri none");
                }
        }
 
@@ -288,7 +305,7 @@ void _update_firmware_resource(OCRepPayload *input)
        if (OCRepPayloadGetPropInt(input, OC_RSRVD_FIRMWARE_PACKAGE_SIZE, &package_size)) {
                g_firmware_resource->package_size = package_size;
                vconf_set_dbl(VCONF_FIRMWARE_UPDATE_PACKAGE_SIZE, (double)package_size);
-               FWR_LOGD("g_firmware_resource->package_size = [%lld]", package_size);
+               FWR_LOGI("g_firmware_resource->package_size = [%lld]", package_size);
        }
 
        char *package_md5 = NULL;
@@ -299,19 +316,19 @@ void _update_firmware_resource(OCRepPayload *input)
                        vconf_set_str(VCONF_FIRMWARE_UPDATE_PACKAGE_MD5, package_md5);
                }
                g_free(package_md5);
-               FWR_LOGD("g_firmware_resource->package_md5 = [%s]", g_firmware_resource->package_md5);
+               FWR_LOGI("g_firmware_resource->package_md5 = [%s]", g_firmware_resource->package_md5);
        }
 
        int64_t update_time;
        if (OCRepPayloadGetPropInt(input, OC_RSRVD_FIRMWARE_UPDATE_TIME, &update_time)) {
                g_firmware_resource->update_time = update_time;
-               FWR_LOGD("g_firmware_resource->update_time = [%lld]", update_time);
+               FWR_LOGI("g_firmware_resource->update_time = [%lld]", update_time);
                /* TODO : Check Scheduled update , */
        }
 
        int64_t *update = (int64_t *)calloc(1, sizeof(int64_t));
        if (!update) {
-               FWR_LOGD("Memory allocation error!");
+               FWR_LOGE("Memory allocation error!");
                return;
        }
 
@@ -321,10 +338,9 @@ void _update_firmware_resource(OCRepPayload *input)
                pthread_t pThread;
                pthread_create(&pThread, NULL, _worker, update);
        } else {
-               free(update);
+               g_free(update);
        }
 
-
        fmwup_propagate_firmware_resource();
 }
 
@@ -346,16 +362,16 @@ OCEntityHandlerResult _process_get_request(OCEntityHandlerRequest *ehRequest, OC
 
 OCEntityHandlerResult _process_post_request(OCEntityHandlerRequest *ehRequest, OCRepPayload** payload)
 {
-       FWR_LOGD("ProcessPostRequest enter");
+       FWR_ENTER
        OCEntityHandlerResult ehResult = OC_EH_ERROR;
        if (ehRequest->payload && ehRequest->payload->type != PAYLOAD_TYPE_REPRESENTATION) {
-               FWR_LOGD("Incoming payload not a representation");
+               FWR_LOGE("Incoming payload not a representation");
                return ehResult;
        }
 
        OCRepPayload* input = (OCRepPayload*)(ehRequest->payload);
        if (!input) {
-               FWR_LOGD("Failed to parse");
+               FWR_LOGE("Failed to parse");
                return ehResult;
        }
 
@@ -372,6 +388,7 @@ OCEntityHandlerResult _process_post_request(OCEntityHandlerRequest *ehRequest, O
        *payload = getResp;
        ehResult = OC_EH_OK;
 
+       FWR_EXIT
        return ehResult;
 }
 
@@ -405,13 +422,13 @@ OCEntityHandlerResult fmwup_handle_firmware_entity(OCEntityHandlerFlag flag,
 
                        // Send the response
                        if (OCDoResponse(&response) != OC_STACK_OK) {
-                               FWR_LOGD("Error sending response");
+                               FWR_LOGE("Error sending response");
                                ehRet = OC_EH_ERROR;
                        }
 
                        if (OC_REST_POST == entityHandlerRequest->method || OC_REST_PUT == entityHandlerRequest->method) {
                                if (OCNotifyAllObservers(g_firmware_resource->resource_handle, OC_NA_QOS) != OC_STACK_OK) {
-                                       printf("Fail to OCNotifyAllObservers()\n");
+                                       FWR_LOGI("Fail to OCNotifyAllObservers()");
                                        ehRet = OC_EH_ERROR;
                                }
                        }
@@ -465,15 +482,15 @@ void fmwup_get_firmware_info(fmwup_s *firmware_info)
 #endif
 
        if (vconf_get_int(VCONF_FIRMWARE_UPDATE_STATE, &update_state) != 0) {
-               FWR_LOGD("vconf_get_int() is failed");
+               FWR_LOGE("vconf_get_int() is failed");
        }
 
        if (vconf_get_int(VCONF_FIRMWARE_UPDATE_RESULT, &update_result) != 0) {
-               FWR_LOGD("vconf_get_int() is failed");
+               FWR_LOGE("vconf_get_int() is failed");
        }
 
        if (vconf_get_dbl(VCONF_FIRMWARE_UPDATE_PACKAGE_SIZE, &package_size) != 0) {
-               FWR_LOGD("vconf_get_dbl() is failed");
+               FWR_LOGE("vconf_get_dbl() is failed");
        }
        new_firmware_ver = vconf_get_str(VCONF_FIRMWARE_UPDATE_PACKAGE_NEW_VERSION);
        package_md5 = vconf_get_str(VCONF_FIRMWARE_UPDATE_PACKAGE_MD5);