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