{
FWR_ENTER
int result = FMWUP_RESULT_INITIAL;
+ char *download_path = NULL;
#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 ||
FWR_LOGD("***Downloading image from [%s] ***", g_firmware_resource->package_uri);
fmwup_propagate_firmware_status_resource(FMWUP_STATE_DOWNLOADING, FMWUP_RESULT_INITIAL, true);
+ download_path = g_strconcat(g_download_path, FIRMWARE_FILE_NAME, NULL);
#ifdef _USE_WWST_
//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);
FWR_LOGI("request_uri[%s]", request_uri);
}
#else
- if (fmwup_http_download_file(g_firmware_resource->package_uri, (const char *)g_download_path) != 0) {
+ if (fmwup_http_download_file(g_firmware_resource->package_uri, (const char *)download_path) != 0) {
FWR_LOGE("fmwup_http_download_file failed");
result = FMWUP_RESULT_INVALID_URL;
goto _END_OF_FUNC_;
fmwup_propagate_firmware_status_resource(FMWUP_STATE_UPDATING, FMWUP_RESULT_INITIAL, true);
/* request to update by dbus (fota client) */
- if (fmwup_dbus_exec_update(g_download_path) != 0) {
+ if (fmwup_dbus_exec_update(download_path) != 0) {
FWR_LOGE("Fota client update failed");
result = FMWUP_RESULT_UPDATE_FAILED;
goto _END_OF_FUNC_;
#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
+ g_free(download_path);
FWR_EXIT
return;
#else
if (system_info_get_platform_string("http://tizen.org/system/manufacturer", &manufacturer)
!= SYSTEM_INFO_ERROR_NONE) {
- FWR_LOGD("system_info_get_platform_string() is failed");
+ FWR_LOGD("system_info_get_platform_string() manufacturer is failed");
}
if (system_info_get_platform_string("http://tizen.org/system/model_name", &model_name)
!= SYSTEM_INFO_ERROR_NONE) {
- FWR_LOGD("system_info_get_platform_string() is failed");
+ FWR_LOGD("system_info_get_platform_string() model_name is failed");
}
- if (system_info_get_platform_string("http://tizen.org/system/build.version.release", &cur_firmware_ver)
- != SYSTEM_INFO_ERROR_NONE) {
- FWR_LOGD("system_info_get_platform_string() is failed");
+ if (system_info_get_platform_string("http://tizen.org/system/build.date", &cur_firmware_ver)
+ != SYSTEM_INFO_ERROR_NONE) {
+ FWR_LOGD("system_info_get_platform_string() build.date is failed");
}
+
+// if (system_info_get_platform_string("http://tizen.org/system/build.version.release", &cur_firmware_ver)
+// != SYSTEM_INFO_ERROR_NONE) {
+// FWR_LOGD("system_info_get_platform_string() is failed");
+// }
#endif
if (vconf_get_int(VCONF_FIRMWARE_UPDATE_STATE, &update_state) != 0) {