Limits concurrent downloads to 15 on TV 42/245742/2
authorSeonah Moon <seonah1.moon@samsung.com>
Thu, 8 Oct 2020 03:25:27 +0000 (12:25 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Thu, 15 Oct 2020 07:18:20 +0000 (16:18 +0900)
Change-Id: Ib70042cd7c9e6f875e7c32cef76e434ec7d6e77a

CMakeLists.txt
agent/include/download-agent-defs.h
packaging/download-provider.spec

index 1f8c20d..5bc41c2 100755 (executable)
@@ -40,6 +40,11 @@ IF(DEFINED SUPPORT_COMPANION_MODE)
        ENDIF(SUPPORT_COMPANION_MODE)
 ENDIF(DEFINED SUPPORT_COMPANION_MODE)
 
+IF(DEFINED MAX_CONCURRENT_DOWNLOADS)
+       MESSAGE("MAX_CONCURRENT_DOWNLOADS: ${MAX_CONCURRENT_DOWNLOADS}")
+       ADD_DEFINITIONS(-DMAX_CONCURRENT_DOWNLOADS=${MAX_CONCURRENT_DOWNLOADS})
+ENDIF(DEFINED MAX_CONCURRENT_DOWNLOADS)
+
 ADD_DEFINITIONS(-DLIB_AGENT_PATH=\"${LIB_AGENT_PATH}\")
 IF(BUILD_GCOV)
        ADD_DEFINITIONS(-DBUILD_GCOV)
index 9bb800e..51445c9 100755 (executable)
  * Max count to download files simultaneously. \n
  * Main reason for this restriction is because of Network bandwidth.
  */
+#ifdef MAX_CONCURRENT_DOWNLOADS
+#define DA_MAX_DOWNLOAD_REQ_AT_ONCE    MAX_CONCURRENT_DOWNLOADS
+#else
 #define DA_MAX_DOWNLOAD_REQ_AT_ONCE    50
+#endif
+
 #define DA_MAX_TIME_OUT                                        65
 
 #define DA_RESULT_OK   0
index 5bbf7c3..b96ddd0 100755 (executable)
@@ -67,6 +67,9 @@ Description: Download the contents in background (development files)
 %if "%{?tizen_profile_name}" == "tv"
 %define _ca_cert /opt/data/cert/vdca.pem
 %define _ca_path /opt/data/cert/user/
+%define max_concurrent_downloads 15
+%else
+%define max_concurrent_downloads 50
 %endif
 
 %build
@@ -111,6 +114,7 @@ export LDFLAGS+=" -lgcov"
        -DSUPPORT_MULTILINGUAL:BOOL=ON \
 %else
        -DSUPPORT_MULTILINGUAL:BOOL=OFF \
+       -DMAX_CONCURRENT_DOWNLOADS=%{?max_concurrent_downloads}\
 %endif
        -DCMAKE_LOG_DUMP_SCRIPT_DIR=%{_logdump_script_dir} \
        -DHTTP_LIB=%{_http_lib} \