Compare commits
11 Commits
e92c09361b
...
083fb191dd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
083fb191dd | ||
|
|
5b10cb74eb | ||
|
|
1b3dca4d69 | ||
|
|
1df0823dbb | ||
|
|
5e51654d36 | ||
|
|
4edfb27151 | ||
|
|
8c56d8448d | ||
|
|
c22f0c7fb1 | ||
|
|
c57451455c | ||
|
|
f51dd9777e | ||
|
|
c5a4e6f51f |
55
0002-device-manager-only-support-for-network.patch
Normal file
55
0002-device-manager-only-support-for-network.patch
Normal file
@ -0,0 +1,55 @@
|
||||
From 62b2759508a22df2ce28dea46a20e8f87bf46337 Mon Sep 17 00:00:00 2001
|
||||
From: tianhang <tian_hang@hoperun.com>
|
||||
Date: Tue, 26 Sep 2023 13:42:14 +0800
|
||||
Subject: [PATCH] only support network coap
|
||||
|
||||
---
|
||||
.../src/dependency/softbus/softbus_connector.cpp | 2 +-
|
||||
services/service/src/softbus/softbus_listener.cpp | 6 +++---
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/services/implementation/src/dependency/softbus/softbus_connector.cpp b/services/implementation/src/dependency/softbus/softbus_connector.cpp
|
||||
index 6640fff..4c655e2 100644
|
||||
--- a/services/implementation/src/dependency/softbus/softbus_connector.cpp
|
||||
+++ b/services/implementation/src/dependency/softbus/softbus_connector.cpp
|
||||
@@ -135,7 +135,7 @@ int32_t SoftbusConnector::PublishDiscovery(const DmPublishInfo &dmPublishInfo)
|
||||
(void)memset_s(&publishInfo, sizeof(PublishInfo), 0, sizeof(PublishInfo));
|
||||
publishInfo.publishId = dmPublishInfo.publishId;
|
||||
publishInfo.mode = (DiscoverMode)dmPublishInfo.mode;
|
||||
- publishInfo.medium = ExchangeMedium::AUTO;
|
||||
+ publishInfo.medium = ExchangeMedium::COAP;
|
||||
publishInfo.freq = (ExchangeFreq)dmPublishInfo.freq;
|
||||
publishInfo.capability = DM_CAPABILITY_OSD;
|
||||
publishInfo.ranging = dmPublishInfo.ranging;
|
||||
diff --git a/services/service/src/softbus/softbus_listener.cpp b/services/service/src/softbus/softbus_listener.cpp
|
||||
index b882271..b4d36b5 100644
|
||||
--- a/services/service/src/softbus/softbus_listener.cpp
|
||||
+++ b/services/service/src/softbus/softbus_listener.cpp
|
||||
@@ -100,7 +100,7 @@ void SoftbusListener::SetPublishInfo(PublishInfo &dmPublishInfo)
|
||||
{
|
||||
dmPublishInfo.publishId = DISTRIBUTED_HARDWARE_DEVICEMANAGER_SA_ID;
|
||||
dmPublishInfo.mode = DiscoverMode::DISCOVER_MODE_ACTIVE;
|
||||
- dmPublishInfo.medium = ExchangeMedium::AUTO;
|
||||
+ dmPublishInfo.medium = ExchangeMedium::COAP;
|
||||
dmPublishInfo.freq = ExchangeFreq::HIGH;
|
||||
dmPublishInfo.capability = DM_CAPABILITY_OSD;
|
||||
dmPublishInfo.ranging = false;
|
||||
@@ -288,7 +288,7 @@ void SoftbusListener::OnParameterChgCallback(const char *key, const char *value,
|
||||
(void)memset_s(&dmPublishInfo, sizeof(PublishInfo), 0, sizeof(PublishInfo));
|
||||
dmPublishInfo.publishId = DISTRIBUTED_HARDWARE_DEVICEMANAGER_SA_ID;
|
||||
dmPublishInfo.mode = DiscoverMode::DISCOVER_MODE_ACTIVE;
|
||||
- dmPublishInfo.medium = ExchangeMedium::AUTO;
|
||||
+ dmPublishInfo.medium = ExchangeMedium::COAP;
|
||||
dmPublishInfo.freq = ExchangeFreq::HIGH;
|
||||
dmPublishInfo.capability = DM_CAPABILITY_OSD;
|
||||
dmPublishInfo.ranging = false;
|
||||
@@ -331,4 +331,4 @@ void SoftbusListener::OnSoftbusDeviceInfoChanged(NodeBasicInfoType type, NodeBas
|
||||
LOGD("SoftbusListener::OnSoftbusDeviceInfoChanged.");
|
||||
}
|
||||
} // namespace DistributedHardware
|
||||
-} // namespace OHOS
|
||||
\ No newline at end of file
|
||||
+} // namespace OHOS
|
||||
--
|
||||
2.33.0
|
||||
|
||||
35
0003-Fix-crash-for-nullptr-in-EstablishAuthChannel.patch
Normal file
35
0003-Fix-crash-for-nullptr-in-EstablishAuthChannel.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From 0ed00210a137abe34c706bdb1058a7fe0bcb3dfe Mon Sep 17 00:00:00 2001
|
||||
From: Wei Jiangang <wei_jiangang@hoperun.com>
|
||||
Date: Thu, 28 Mar 2024 12:13:57 +0800
|
||||
Subject: [PATCH] Fix crash for nullptr in EstablishAuthChannel
|
||||
|
||||
Signed-off-by: Wei Jiangang <wei_jiangang@hoperun.com>
|
||||
---
|
||||
.../implementation/src/authentication/dm_auth_manager.cpp | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/services/implementation/src/authentication/dm_auth_manager.cpp b/services/implementation/src/authentication/dm_auth_manager.cpp
|
||||
index 4b0fbd91..2874bec6 100644
|
||||
--- a/services/implementation/src/authentication/dm_auth_manager.cpp
|
||||
+++ b/services/implementation/src/authentication/dm_auth_manager.cpp
|
||||
@@ -426,7 +426,9 @@ int32_t DmAuthManager::EstablishAuthChannel(const std::string &deviceId)
|
||||
LOGE("OpenAuthSession failed, stop the authentication");
|
||||
authResponseContext_ = std::make_shared<DmAuthResponseContext>();
|
||||
authResponseContext_->state = AuthState::AUTH_REQUEST_NEGOTIATE;
|
||||
- authRequestContext_->reason = ERR_DM_AUTH_OPEN_SESSION_FAILED;
|
||||
+ if (authRequestContext_ != nullptr) {
|
||||
+ authRequestContext_->reason = ERR_DM_AUTH_OPEN_SESSION_FAILED;
|
||||
+ }
|
||||
if (authRequestState_ != nullptr) {
|
||||
authRequestState_->TransitionTo(std::make_shared<AuthRequestFinishState>());
|
||||
}
|
||||
@@ -940,4 +942,4 @@ bool DmAuthManager::IsIdenticalAccount()
|
||||
return true;
|
||||
}
|
||||
} // namespace DistributedHardware
|
||||
-} // namespace OHOS
|
||||
\ No newline at end of file
|
||||
+} // namespace OHOS
|
||||
--
|
||||
2.33.0
|
||||
|
||||
28
0004-Add-placeholder-for-the-string-of-params.patch
Normal file
28
0004-Add-placeholder-for-the-string-of-params.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 54dc0047537a1ac80621abf3b62efc2b4266b7c8 Mon Sep 17 00:00:00 2001
|
||||
From: Wei Jiangang <wei_jiangang@hoperun.com>
|
||||
Date: Mon, 1 Apr 2024 11:56:15 +0800
|
||||
Subject: [PATCH] Add placeholder for the string of params
|
||||
|
||||
Signed-off-by: Wei Jiangang <wei_jiangang@hoperun.com>
|
||||
---
|
||||
services/service/src/device_manager_service.cpp | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/services/service/src/device_manager_service.cpp b/services/service/src/device_manager_service.cpp
|
||||
index 904bca7c..f167f719 100755
|
||||
--- a/services/service/src/device_manager_service.cpp
|
||||
+++ b/services/service/src/device_manager_service.cpp
|
||||
@@ -248,8 +248,8 @@ int32_t DeviceManagerService::GetFaParam(std::string &pkgName, DmAuthParam &auth
|
||||
int32_t DeviceManagerService::SetUserOperation(std::string &pkgName, int32_t action, const std::string ¶ms)
|
||||
{
|
||||
if (pkgName.empty() || params.empty()) {
|
||||
- LOGE("DeviceManagerService::SetUserOperation error: Invalid parameter, pkgName: %s", pkgName.c_str(),
|
||||
- params.c_str());
|
||||
+ LOGE("DeviceManagerService::SetUserOperation error: Invalid parameter, pkgName: %s, params: %s.",
|
||||
+ pkgName.c_str(), params.c_str());
|
||||
return ERR_DM_INPUT_PARA_INVALID;
|
||||
}
|
||||
if (!IsDMServiceImplReady()) {
|
||||
--
|
||||
2.33.0
|
||||
|
||||
25
0005-release-handle-when-dlerror-returns-non-nullptr.patch
Normal file
25
0005-release-handle-when-dlerror-returns-non-nullptr.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 4c6bb127d9b70a31625d3aa58ecea9efea813465 Mon Sep 17 00:00:00 2001
|
||||
From: Wei Jiangang <wei_jiangang@hoperun.com>
|
||||
Date: Wed, 29 May 2024 10:53:07 +0800
|
||||
Subject: [PATCH] release handle when dlerror returns non-nullptr
|
||||
|
||||
Signed-off-by: Wei Jiangang <wei_jiangang@hoperun.com>
|
||||
---
|
||||
services/service/src/device_manager_service.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/services/service/src/device_manager_service.cpp b/services/service/src/device_manager_service.cpp
|
||||
index f167f719..b07b8574 100755
|
||||
--- a/services/service/src/device_manager_service.cpp
|
||||
+++ b/services/service/src/device_manager_service.cpp
|
||||
@@ -407,6 +407,7 @@ bool DeviceManagerService::IsDMServiceImplReady()
|
||||
dlerror();
|
||||
auto func = (CreateDMServiceFuncPtr)dlsym(so_handle, "CreateDMServiceObject");
|
||||
if (dlerror() != nullptr || func == nullptr) {
|
||||
+ dlclose(so_handle);
|
||||
LOGE("Create object function is not exist.");
|
||||
return false;
|
||||
}
|
||||
--
|
||||
2.39.1
|
||||
|
||||
@ -0,0 +1,67 @@
|
||||
From bf69a1d308580601b364134f91f444d7a7894534 Mon Sep 17 00:00:00 2001
|
||||
From: s_c_c <shichuchao@huawei.com>
|
||||
Date: Mon, 24 Jun 2024 17:12:31 +0800
|
||||
Subject: [PATCH] feat for embedded fix device manager compile error
|
||||
|
||||
---
|
||||
interfaces/inner_kits/native_cpp/BUILD.gn | 4 ++++
|
||||
services/service/BUILD.gn | 5 +++++
|
||||
utils/BUILD.gn | 4 ++++
|
||||
3 files changed, 13 insertions(+)
|
||||
|
||||
diff --git a/interfaces/inner_kits/native_cpp/BUILD.gn b/interfaces/inner_kits/native_cpp/BUILD.gn
|
||||
index 81ea6a6..f215264 100644
|
||||
--- a/interfaces/inner_kits/native_cpp/BUILD.gn
|
||||
+++ b/interfaces/inner_kits/native_cpp/BUILD.gn
|
||||
@@ -147,6 +147,10 @@ if (defined(ohos_lite)) {
|
||||
"LOG_DOMAIN=0xD004100",
|
||||
]
|
||||
|
||||
+ cflags = [
|
||||
+ "-Wno-unused-variable",
|
||||
+ ]
|
||||
+
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
# "hisysevent_native:libhisysevent",
|
||||
diff --git a/services/service/BUILD.gn b/services/service/BUILD.gn
|
||||
index fd7bb18..e10f99f 100644
|
||||
--- a/services/service/BUILD.gn
|
||||
+++ b/services/service/BUILD.gn
|
||||
@@ -222,6 +222,10 @@ if (defined(ohos_lite)) {
|
||||
"LOG_DOMAIN=0xD004100",
|
||||
]
|
||||
|
||||
+ cflags = [
|
||||
+ "-Wno-unused-variable",
|
||||
+ ]
|
||||
+
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
"dsoftbus:softbus_client",
|
||||
@@ -230,6 +234,7 @@ if (defined(ohos_lite)) {
|
||||
"init:libbegetutil",
|
||||
"ipc:ipc_core",
|
||||
"safwk:system_ability_fwk",
|
||||
+ "samgr:samgr_proxy",
|
||||
]
|
||||
|
||||
subsystem_name = "distributedhardware"
|
||||
diff --git a/utils/BUILD.gn b/utils/BUILD.gn
|
||||
index 59e9e9b..e9b43e2 100644
|
||||
--- a/utils/BUILD.gn
|
||||
+++ b/utils/BUILD.gn
|
||||
@@ -178,6 +178,10 @@ if (defined(ohos_lite)) {
|
||||
"LOG_DOMAIN=0xD004100",
|
||||
]
|
||||
|
||||
+ cflags = [
|
||||
+ "-Wno-unused-variable",
|
||||
+ ]
|
||||
+
|
||||
deps = [ "//third_party/mbedtls:mbedtls_shared" ]
|
||||
|
||||
external_deps = [
|
||||
--
|
||||
2.45.2.windows.1
|
||||
|
||||
@ -12,10 +12,11 @@
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/ohos.gni")
|
||||
import("//build/config/sysroot.gni")
|
||||
|
||||
config("devicemanagersdk_config") {
|
||||
include_dirs = [
|
||||
"include"
|
||||
"${sysroot}/usr/include/device_manager"
|
||||
]
|
||||
libs = ["devicemanagersdk.z"]
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
Name: distributedhardware_device_manager
|
||||
Version: 1.0.0
|
||||
Release: 2
|
||||
Release: 7
|
||||
Summary: Distributed middleware used components.
|
||||
License: Apache-2.0
|
||||
Url: https://gitee.com/openharmony/
|
||||
@ -19,6 +19,11 @@ Source4: device_manager.BUILD.gn
|
||||
Source5: device_manager.xml
|
||||
|
||||
Patch1: 0001-remove-dependency-and-adapt-for-build-device_manager.patch
|
||||
Patch2: 0002-device-manager-only-support-for-network.patch
|
||||
Patch3: 0003-Fix-crash-for-nullptr-in-EstablishAuthChannel.patch
|
||||
Patch4: 0004-Add-placeholder-for-the-string-of-params.patch
|
||||
Patch5: 0005-release-handle-when-dlerror-returns-non-nullptr.patch
|
||||
Patch6: 0006-feat-for-embedded-fix-device-manager-compile-error.patch
|
||||
|
||||
BuildRequires: gcc, make, hilog, kernel-devel, uname-build-checks
|
||||
BuildRequires: distributed-build, distributed-beget
|
||||
@ -52,6 +57,11 @@ cp -rf %{_builddir}/build/openeuler/compiler_gn/* %{_builddir}
|
||||
|
||||
%setup -q -D -T -a 1 -c -n %{distributedhardware_dir}/
|
||||
%patch -P1 -p1 -d %{distributedhardware_dir}/device_manager
|
||||
%patch -P2 -p1 -d %{distributedhardware_dir}/device_manager
|
||||
%patch -P3 -p1 -d %{distributedhardware_dir}/device_manager
|
||||
%patch -P4 -p1 -d %{distributedhardware_dir}/device_manager
|
||||
%patch -P5 -p1 -d %{distributedhardware_dir}/device_manager
|
||||
%patch -P6 -p1 -d %{distributedhardware_dir}/device_manager
|
||||
|
||||
%setup -q -D -T -a 2 -c -n %{third_party_dir}/
|
||||
|
||||
@ -114,9 +124,19 @@ ln -s /usr/include/device_manager %{buildroot}%{build_opt}/openeuler/compiler_gn
|
||||
/system/*
|
||||
|
||||
%changelog
|
||||
* Mon Jun 24 2024 s_c_c <shichuchao@huawei.com> - 1.0.0-7
|
||||
- Fix unused variable and include_dirs errors for embedded
|
||||
|
||||
* Wed May 29 2024 wei_jiangang <wei_jiangang@hoperun.com> - 1.0.0-6
|
||||
- release handle when dlerror returns non-nullptr
|
||||
* Mon Apr 1 2024 wei_jiangang <wei_jiangang@hoperun.com> - 1.0.0-5
|
||||
- Add placeholder for the string of params
|
||||
* Wed Mar 27 2024 wei_jiangang <wei_jiangang@hoperun.com> - 1.0.0-4
|
||||
- Fix crash while authenticating
|
||||
* Tue Mar 26 2024 tianhang <tian_hang@hoperun.com> - 1.0.0-3
|
||||
- the auto parameter in device manager may cause the softbus to be abnormal
|
||||
* Fri Dec 15 2023 heppen <hepeng68@huawei.com> - 1.0.0-2
|
||||
- Add SA profile
|
||||
|
||||
* Tue Oct 31 2023 Yuying Mu <muyuying1@huawei.com> - 1.0.0-1
|
||||
* Tue Nov 21 2023 Jiaqi Zhao <zhaojiaqi18@huawei.com> - 1.0.0-1
|
||||
- Init and adapt device manager to openEuler
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user