Browse Source
Merge pull request #16281 from thingsboard/lwm2m_fix_discovery_bs
Fixed LwM2M Bootstrap Discover operation by targeting specific objects instead of root
pull/16318/head
Viacheslav Klimov
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
6 additions and
3 deletions
-
common/transport/lwm2m/src/main/java/org/thingsboard/server/transport/lwm2m/bootstrap/store/LwM2MBootstrapConfigStoreTaskProvider.java
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
// SPDX-FileCopyrightText: Copyright The ThingsBoard Authors
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1
|
|
|
|
package org.thingsboard.server.transport.lwm2m.bootstrap.store; |
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
@ -70,8 +71,10 @@ public class LwM2MBootstrapConfigStoreTaskProvider implements LwM2MBootstrapTask |
|
|
|
} |
|
|
|
if (previousResponse == null && shouldStartWithDiscover(configNew)) { |
|
|
|
Tasks tasks = new Tasks(); |
|
|
|
tasks.requestsToSend = new ArrayList<>(1); |
|
|
|
tasks.requestsToSend.add(new BootstrapDiscoverRequest()); |
|
|
|
tasks.requestsToSend = new ArrayList<>(3); |
|
|
|
tasks.requestsToSend.add(new BootstrapDiscoverRequest("/0")); |
|
|
|
tasks.requestsToSend.add(new BootstrapDiscoverRequest("/1")); |
|
|
|
tasks.requestsToSend.add(new BootstrapDiscoverRequest("/2")); |
|
|
|
tasks.last = false; |
|
|
|
return tasks; |
|
|
|
} else { |
|
|
|
|