Add set_download_path for package 87/147287/1
authorhhk86.heo <hhk86.heo@samsung.com>
Mon, 4 Sep 2017 01:12:54 +0000 (10:12 +0900)
committerhhk86.heo <hhk86.heo@samsung.com>
Mon, 4 Sep 2017 01:12:54 +0000 (10:12 +0900)
Change-Id: Ie1b8781422576b5d788c0264ddfc84dfb181d1fe

src/fmw_update_service_internal.c

index f7a000bfafbaaab3bad5dc1e9f87d2c65d43ee38..666b993561031e29a27e20af07cf8175e8c2bc8c 100644 (file)
@@ -146,6 +146,14 @@ static FILE *_client_open(const char *path, const char *mode)
        return fopen(fmwup_data_file, mode);
 }
 
+
+void _set_firmware_download_path()
+{
+       FWR_LOGD("_set_firmware_download_path() is called\n");
+       if (fmwup_set_firmware_download_path(_get_app_data_path()) != 0)
+               FWR_LOGD("_set_firmware_download_path() is failed\n");
+}
+
 void _set_platform_info()
 {
        FWR_LOGD("_set_platform_info() is called\n");
@@ -457,6 +465,8 @@ int init_oc_stack()
 
        _set_device_info();
 
+       _set_firmware_download_path();
+
        pthread_t oc_proc_thd;
        pthread_create(&oc_proc_thd, NULL, _oc_process_thd, NULL);
 
@@ -858,7 +868,7 @@ void _get_login_info()
 
        keyfile = g_key_file_new();
 
-       snprintf(tmp, sizeof(tmp), "%s/%s", _get_app_data_path(), OAUTH_FILE_NAME);
+       snprintf(tmp, sizeof(tmp), "%s%s", _get_app_data_path(), OAUTH_FILE_NAME);
        FWR_LOGD("login info [%s]", tmp);
 
        g_key_file_load_from_file(keyfile, tmp, flags, &error);