!10 The auto parameter in device manager may cause the softbus to be abnormal
From: @tian2020 Reviewed-by: @peng-langyuan, @bugflyfly Signed-off-by: @bugflyfly
This commit is contained in:
commit
f51dd9777e
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
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
Name: distributedhardware_device_manager
|
||||
Version: 1.0.0
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: Distributed middleware used components.
|
||||
License: Apache-2.0
|
||||
Url: https://gitee.com/openharmony/
|
||||
@ -19,6 +19,7 @@ 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
|
||||
|
||||
BuildRequires: gcc, make, hilog, kernel-devel, uname-build-checks
|
||||
BuildRequires: distributed-build, distributed-beget
|
||||
@ -52,6 +53,7 @@ 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
|
||||
|
||||
%setup -q -D -T -a 2 -c -n %{third_party_dir}/
|
||||
|
||||
@ -114,6 +116,9 @@ ln -s /usr/include/device_manager %{buildroot}%{build_opt}/openeuler/compiler_gn
|
||||
/system/*
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user