From e6d6244fda863cbc17753ddd56cc2251ff9ab03c Mon Sep 17 00:00:00 2001 From: l00635678 Date: Mon, 16 Jun 2025 17:53:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E4=BB=B6=E7=8B=AC=E7=AB=8B=E7=BC=96?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: l00635678 --- frameworks/js/napi/http/BUILD.gn | 2 +- frameworks/js/napi/http/http_exec/src/http_exec.cpp | 2 +- frameworks/js/napi/net_ssl/BUILD.gn | 5 +++-- frameworks/native/http/http_client/http_client_task.cpp | 2 +- interfaces/innerkits/net_ssl/BUILD.gn | 1 - netstack_config.gni | 5 ----- test/fuzztest/websocketcapi_fuzzer/BUILD.gn | 1 - test/unittest/http/BUILD.gn | 9 +++++---- test/unittest/http/cache/BUILD.gn | 2 +- .../unittest/tlssocket/core/tls_config_enhanced.test.cpp | 1 - utils/BUILD.gn | 1 - utils/common_utils/include/netstack_hisysevent.h | 4 +--- utils/napi_utils/BUILD.gn | 6 +++--- 13 files changed, 16 insertions(+), 25 deletions(-) diff --git a/frameworks/js/napi/http/BUILD.gn b/frameworks/js/napi/http/BUILD.gn index 4439ee5ab..51816ebfc 100644 --- a/frameworks/js/napi/http/BUILD.gn +++ b/frameworks/js/napi/http/BUILD.gn @@ -120,7 +120,6 @@ ohos_shared_library("http") { "$NETSTACK_DIR/utils/common_utils/src/request_tracer.cpp", ] deps = [ - "$ARKUI_ROOT/napi:ace_napi", "$NETSTACK_DIR/utils/napi_utils:napi_utils_static", ] external_deps = [ @@ -128,6 +127,7 @@ ohos_shared_library("http") { "cJSON:cjson", "curl:curl_shared", "jsoncpp:jsoncpp_static", + "napi:ace_napi", ] ldflags = [ "-lpthread" ] } else { diff --git a/frameworks/js/napi/http/http_exec/src/http_exec.cpp b/frameworks/js/napi/http/http_exec/src/http_exec.cpp index 042d5988c..eddc37d85 100755 --- a/frameworks/js/napi/http/http_exec/src/http_exec.cpp +++ b/frameworks/js/napi/http/http_exec/src/http_exec.cpp @@ -503,7 +503,7 @@ void HttpExec::CacheCurlPerformanceTiming(CURL *handle, RequestContext *context) if (EventReport::GetInstance().IsValid()) { HttpPerfInfo httpPerfInfo; httpPerfInfo.totalTime = totalTime; - httpPerfInfo.size = size; + httpPerfInfo.size = static_cast(size); httpPerfInfo.dnsTime = dnsTime; httpPerfInfo.tlsTime = tlsTime == 0 ? 0 : tlsTime - connectTime; httpPerfInfo.tcpTime = connectTime == 0 ? 0 : connectTime - dnsTime; diff --git a/frameworks/js/napi/net_ssl/BUILD.gn b/frameworks/js/napi/net_ssl/BUILD.gn index 21e725288..ce194344b 100644 --- a/frameworks/js/napi/net_ssl/BUILD.gn +++ b/frameworks/js/napi/net_ssl/BUILD.gn @@ -20,7 +20,6 @@ config("networksecurity_napi_config") { "async_work/include", "net_ssl_exec/include", "net_ssl_module/include", - "$THIRD_PARTY_ROOT/openssl/include", "$NETSTACK_DIR/frameworks/native/net_ssl/include", "$NETSTACK_DIR/interfaces/innerkits/net_ssl/include", "$NETSTACK_DIR/utils/common_utils/include", @@ -73,9 +72,11 @@ ohos_shared_library("networksecurity_napi") { sources += [ "$NETSTACK_DIR/utils/common_utils/src/netstack_common_utils.cpp" ] deps += [ - "$ARKUI_ROOT/napi:ace_napi", "$NETSTACK_DIR/utils/napi_utils:napi_utils_static", ] + external_deps += [ + "napi:ace_napi", + ] } else { deps += [ "$NETSTACK_DIR/interfaces/innerkits/net_ssl:net_ssl", diff --git a/frameworks/native/http/http_client/http_client_task.cpp b/frameworks/native/http/http_client/http_client_task.cpp index 0ef3f63b2..b8742a8c1 100644 --- a/frameworks/native/http/http_client/http_client_task.cpp +++ b/frameworks/native/http/http_client/http_client_task.cpp @@ -816,7 +816,7 @@ void HttpClientTask::DumpHttpPerformance() if (EventReport::GetInstance().IsValid()) { HttpPerfInfo httpPerfInfo; httpPerfInfo.totalTime = totalTime; - httpPerfInfo.size = size; + httpPerfInfo.size = static_cast(size); httpPerfInfo.dnsTime = dnsTime; httpPerfInfo.tlsTime = tlsTime == 0 ? 0 : tlsTime - connectTime; httpPerfInfo.tcpTime = connectTime == 0 ? 0 : connectTime - dnsTime; diff --git a/interfaces/innerkits/net_ssl/BUILD.gn b/interfaces/innerkits/net_ssl/BUILD.gn index 5ac3effd5..516d152ef 100644 --- a/interfaces/innerkits/net_ssl/BUILD.gn +++ b/interfaces/innerkits/net_ssl/BUILD.gn @@ -53,7 +53,6 @@ ohos_shared_library("net_ssl") { ] include_dirs = [ - "$SUBSYSTEM_DIR/ipc/interfaces/innerkits/ipc_core/include", "$NETSTACK_NATIVE_ROOT/net_ssl/include", "$NETSTACK_DIR/utils/log/include", ] diff --git a/netstack_config.gni b/netstack_config.gni index 52dd3ffe7..110521763 100644 --- a/netstack_config.gni +++ b/netstack_config.gni @@ -17,14 +17,9 @@ NETSTACK_DIR = "$SUBSYSTEM_DIR/netstack" NETSTACK_NATIVE_ROOT = "$NETSTACK_DIR/frameworks/native" NETSTACK_INNERKITS_DIR = "$NETSTACK_DIR/interfaces/innerkits" -# args of base module -NETMANAGER_BASE_INNERKITS_DIR = - "$SUBSYSTEM_DIR/netmanager_base/interfaces/innerkits" - # args of other module ARKUI_ROOT = "//foundation/arkui" THIRD_PARTY_ROOT = "//third_party" -HILOG_ROOT = "//base/hiviewdfx/hilog" HILOG_LITE_ROOT = "//base/hiviewdfx/hilog_lite" fuzz_test_path = "netstack/netstack" diff --git a/test/fuzztest/websocketcapi_fuzzer/BUILD.gn b/test/fuzztest/websocketcapi_fuzzer/BUILD.gn index 46ac53173..545b43b19 100644 --- a/test/fuzztest/websocketcapi_fuzzer/BUILD.gn +++ b/test/fuzztest/websocketcapi_fuzzer/BUILD.gn @@ -24,7 +24,6 @@ utils_include = [ "$SUBSYSTEM_DIR/netstack/utils/common_utils/include", "$SUBSYSTEM_DIR/netstack/utils/log/include", "$SUBSYSTEM_DIR/netstack/utils/napi_utils/include", - "$THIRD_PARTY_ROOT/libwebsockets/include", ] common_external_deps = [ diff --git a/test/unittest/http/BUILD.gn b/test/unittest/http/BUILD.gn index 9c6d12949..c76075787 100644 --- a/test/unittest/http/BUILD.gn +++ b/test/unittest/http/BUILD.gn @@ -61,8 +61,6 @@ ohos_unittest("http_unittest") { defined(global_parts_info.communication_netmanager_base) && global_parts_info.communication_netmanager_base) { include_dirs += [ - "$NETMANAGER_BASE_INNERKITS_DIR/include", - "$NETMANAGER_BASE_INNERKITS_DIR/netconnclient/include", "$SUBSYSTEM_DIR/netstack/utils/netstack_chr_client/include", ] } @@ -92,9 +90,12 @@ ohos_unittest("http_unittest") { sources += [ "$NETSTACK_DIR/utils/common_utils/src/netstack_common_utils.cpp" ] deps += [ - "$ARKUI_ROOT/napi:ace_napi", + "napi:ace_napi", "$NETSTACK_DIR/utils/napi_utils:napi_utils_static", - "$THIRD_PARTY_ROOT/bounds_checking_function:libsec_static", + ] + external_deps += [ + "napi:ace_napi", + "bounds_checking_function:libsec_static", ] } else { deps += [ diff --git a/test/unittest/http/cache/BUILD.gn b/test/unittest/http/cache/BUILD.gn index 88aa15167..01fcc113e 100644 --- a/test/unittest/http/cache/BUILD.gn +++ b/test/unittest/http/cache/BUILD.gn @@ -20,11 +20,11 @@ NETSTACK_NAPI_ROOT = "$SUBSYSTEM_DIR/netstack/frameworks/js/napi/" utils_include = [ "$SUBSYSTEM_DIR/netstack/utils/common_utils/include", "$SUBSYSTEM_DIR/netstack/utils/log/include", - "$THIRD_PARTY_ROOT/curl/include", ] common_external_deps = [ "c_utils:utils", + "curl:curl_shared", "hilog:libhilog", ] diff --git a/test/unittest/tlssocket/core/tls_config_enhanced.test.cpp b/test/unittest/tlssocket/core/tls_config_enhanced.test.cpp index 2b5ee1150..b8692d0eb 100644 --- a/test/unittest/tlssocket/core/tls_config_enhanced.test.cpp +++ b/test/unittest/tlssocket/core/tls_config_enhanced.test.cpp @@ -15,7 +15,6 @@ #include -#include "curl/curl.h" #include "gtest/gtest.h" #define private public diff --git a/utils/BUILD.gn b/utils/BUILD.gn index 8b241cda9..1bed5d934 100644 --- a/utils/BUILD.gn +++ b/utils/BUILD.gn @@ -25,7 +25,6 @@ config("stack_utils_common_public_config") { include_dirs = [ "common_utils/include", "log/include", - "$THIRD_PARTY_ROOT/curl/include", ] if (product_name == "ohcore") { defines = [ "OH_CORE_NETSTACK_PERMISSION_CHECK" ] diff --git a/utils/common_utils/include/netstack_hisysevent.h b/utils/common_utils/include/netstack_hisysevent.h index 7f9f9869f..7028210d0 100644 --- a/utils/common_utils/include/netstack_hisysevent.h +++ b/utils/common_utils/include/netstack_hisysevent.h @@ -21,8 +21,6 @@ #include #include -#include "curl/curl.h" - namespace OHOS::NetStack { struct EventInfo { @@ -44,7 +42,7 @@ struct HttpPerfInfo { double tlsTime = 0.0; double firstRecvTime = 0.0; double tcpTime = 0.0; - curl_off_t size = 0; + int64_t size = 0; int64_t responseCode = 0; std::string version = ""; int ipType = 0; diff --git a/utils/napi_utils/BUILD.gn b/utils/napi_utils/BUILD.gn index 4d916b8c6..f66457749 100644 --- a/utils/napi_utils/BUILD.gn +++ b/utils/napi_utils/BUILD.gn @@ -107,9 +107,9 @@ ohos_static_library("napi_utils_static") { "napi:ace_napi", ] } else { - public_deps = [ - "$ARKUI_ROOT/napi:ace_napi", - "$THIRD_PARTY_ROOT/bounds_checking_function:libsec_static", + external_deps += [ + "napi:ace_napi", + "bounds_checking_function:libsec_static", ] } } -- Gitee