From de4bf836aa8c32c0b984e01e1795a94334e8e362 Mon Sep 17 00:00:00 2001 From: heppen Date: Wed, 20 Sep 2023 16:06:27 +0800 Subject: [PATCH] open upd stream and file feature --- ...stream-and-file-feature-for-dsoftbus.patch | 94 +++++++++++++++++++ dsoftbus.spec | 9 +- 2 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 0018-open-udp-stream-and-file-feature-for-dsoftbus.patch diff --git a/0018-open-udp-stream-and-file-feature-for-dsoftbus.patch b/0018-open-udp-stream-and-file-feature-for-dsoftbus.patch new file mode 100644 index 0000000..c00820c --- /dev/null +++ b/0018-open-udp-stream-and-file-feature-for-dsoftbus.patch @@ -0,0 +1,94 @@ +From 271b7e334ec0514952a5532cad572d5ec87b0725 Mon Sep 17 00:00:00 2001 +From: heppen +Date: Wed, 20 Sep 2023 16:00:14 +0800 +Subject: [PATCH] open udp stream and file feature + +--- + .../feature_config/standard/config.gni | 4 ++-- + components/nstackx/fillp/BUILD.gn | 2 +- + core/frame/BUILD.gn | 3 +++ + .../udp/stream/libsoftbus_stream/vtp_instance.cpp | 13 ++++++++++++- + 4 files changed, 18 insertions(+), 4 deletions(-) + +diff --git a/adapter/default_config/feature_config/standard/config.gni b/adapter/default_config/feature_config/standard/config.gni +index 15951d1..75d27a7 100644 +--- a/adapter/default_config/feature_config/standard/config.gni ++++ b/adapter/default_config/feature_config/standard/config.gni +@@ -21,8 +21,8 @@ declare_args() { + dsoftbus_standard_feature_conn_p2p = false + + dsoftbus_standard_feature_trans_udp = true +- dsoftbus_standard_feature_trans_udp_stream = false +- dsoftbus_standard_feature_trans_udp_file = false ++ dsoftbus_standard_feature_trans_udp_stream = true ++ dsoftbus_standard_feature_trans_udp_file = true + + dsoftbus_standard_feature_ip_auth = true + dsoftbus_standard_feature_auth_account = false +diff --git a/components/nstackx/fillp/BUILD.gn b/components/nstackx/fillp/BUILD.gn +index f5c5443..d56fd05 100644 +--- a/components/nstackx/fillp/BUILD.gn ++++ b/components/nstackx/fillp/BUILD.gn +@@ -105,7 +105,7 @@ if (defined(ohos_lite)) { + include_dirs = fillp_include + include_dirs += [ "//utils/native/base/include/" ] + sources = fillp_source +- deps = [ "//utils/native/base:utilsecurec_shared" ] ++ deps = [ "//third_party/bounds_checking_function:libsec_shared" ] + + part_name = "dsoftbus_standard" + subsystem_name = "communication" +diff --git a/core/frame/BUILD.gn b/core/frame/BUILD.gn +index 3948ef6..5936a3a 100644 +--- a/core/frame/BUILD.gn ++++ b/core/frame/BUILD.gn +@@ -180,6 +180,9 @@ if (defined(ohos_lite)) { + ":softbus_server", + "$dsoftbus_root_path/components/nstackx/nstackx_ctrl:nstackx_ctrl", + "$dsoftbus_root_path/components/nstackx/nstackx_util:nstackx_util.open", ++ "$dsoftbus_root_path/components/nstackx/nstackx_core/dfile:nstackx_dfile.open", ++ "$dsoftbus_root_path/components/nstackx/nstackx_congestion:nstackx_congestion.open", ++ "$dsoftbus_root_path/components/nstackx/fillp:FillpSo.open", + "$dsoftbus_root_path/core/common:softbus_utils", + "$dsoftbus_root_path/adapter:softbus_adapter", + "$dsoftbus_root_path/sdk:softbus_client", +diff --git a/sdk/transmission/trans_channel/udp/stream/libsoftbus_stream/vtp_instance.cpp b/sdk/transmission/trans_channel/udp/stream/libsoftbus_stream/vtp_instance.cpp +index 13a1cff..064b5bf 100644 +--- a/sdk/transmission/trans_channel/udp/stream/libsoftbus_stream/vtp_instance.cpp ++++ b/sdk/transmission/trans_channel/udp/stream/libsoftbus_stream/vtp_instance.cpp +@@ -62,9 +62,16 @@ FILLP_UINT32 VtpInstance::CryptoRand() + if (fd < 0) { + return 0; + } +- + FILLP_UINT32 value = 0; ++ ++#ifdef __GNUC__ ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wunused-result" ++#endif + read(fd, &value, sizeof(FILLP_UINT32)); ++#ifdef __GNUC__ ++#pragma GCC diagnostic pop ++#endif + close(fd); + return value; + } +@@ -82,10 +89,14 @@ void VtpInstance::PrintFillpLog(FILLP_UINT32 debugType, FILLP_UINT32 debugLevel, + + va_list vaList; + va_start(vaList, format); ++#ifdef __clang__ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wformat-nonliteral" ++#endif + int result = vsprintf_s(debugInfo, DEBUG_BUFFER_LEN, static_cast(format), vaList); ++#ifdef __clang__ + #pragma clang diagnostic pop ++#endif + if (result < 0) { + SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_ERROR, "**********fillDebugSend Fail!************"); + va_end(vaList); +-- +2.33.0 + diff --git a/dsoftbus.spec b/dsoftbus.spec index d4515db..fcd7f03 100644 --- a/dsoftbus.spec +++ b/dsoftbus.spec @@ -14,7 +14,7 @@ Name: dsoftbus Version: 1.0.0 -Release: 3 +Release: 4 Summary: openEuler embedded softbus capability support License: Apache License 2.0 Url: https://openeuler.gitee.io/yocto-meta-openeuler/features/distributed_softbus.html @@ -45,6 +45,7 @@ Patch0014: 0014-add-depend-for-openeuler.patch Patch0015: 0015-simplify-dependency-on-third-party-packages.patch Patch0016: 0016-adapter-cjson-in-openEuler-for-softbus.patch Patch0017: 0017-simplify-dependency-for-dsoftbus-standard.patch +Patch0018: 0018-open-udp-stream-and-file-feature-for-dsoftbus.patch BuildRequires: gcc, g++, cmake, python, zip, unzip, ninja-build, git, libboundscheck, cjson-devel, openssl-devel, gn @@ -127,6 +128,7 @@ mv %{_builddir}/%{source_commonlibrary_c_utils}-%{openHarmony_source_release} ${ %patch15 -p1 -d ${dsoftbus_hichain}/huks %patch16 -p1 -d ${dsoftbus_thirdparty}/cJSON %patch17 -p1 -d %{_builddir}/%{source_dsoftbus_standard} +%patch18 -p1 -d %{_builddir}/%{source_dsoftbus_standard} # init gn root ln -s ${dsoftbus_build_dir}/build/build_scripts/build.sh ${dsoftbus_build_dir}/build.sh @@ -199,6 +201,9 @@ ${dsoftbus_build_dir}/third_party/bounds_checking_function/include/*.h \ /data/data %changelog +* Wed Sep 20 2023 heppen - 1.0.0-4 +- open udp stream and file feature for dsoftbus + * Wed Nov 30 2022 liheavy - 1.0.0-3 - Disassemble yocto-embedded-tools and replace cjson, ninja, gn, openssl, libboundscheck - with openEuler software package @@ -207,4 +212,4 @@ ${dsoftbus_build_dir}/third_party/bounds_checking_function/include/*.h \ - add URL,change branch of libboundscheck to 22.03-LTS-SP1 * Tue Nov 22 2022 xuchongyu - 1.0.0-1 -- init dsoftbus \ No newline at end of file +- init dsoftbus