加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0002-device-manager-only-support-for-network.patch 2.77 KB
一键复制 编辑 原始数据 按行查看 历史
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化