Skip to content

Commit

Permalink
Support for function Send and notification after device ip address ch…
Browse files Browse the repository at this point in the history
…ange without registration update
  • Loading branch information
JaroslawLegierski committed Apr 3, 2023
1 parent 989f4e7 commit 172e023
Show file tree
Hide file tree
Showing 3 changed files with 554 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void handlePOST(CoapExchange exchange) {
ClientProfile clientProfile = profileProvider.getProfile(sender);

// check we have a registration for this identity
if (clientProfile == null) {
if (clientProfile.getRegistration() == null) {
exchange.respond(ResponseCode.NOT_FOUND, "no registration found");
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.eclipse.leshan.server.model.StandardModelProvider;
import org.eclipse.leshan.server.queue.ClientAwakeTimeProvider;
import org.eclipse.leshan.server.queue.StaticClientAwakeTimeProvider;
import org.eclipse.leshan.server.registration.CustomInMemoryRegistrationStore;
import org.eclipse.leshan.server.registration.InMemoryRegistrationStore;
import org.eclipse.leshan.server.registration.RandomStringRegistrationIdProvider;
import org.eclipse.leshan.server.registration.Registration;
Expand Down Expand Up @@ -276,7 +277,7 @@ public LeshanServerBuilder setEndpointsProvider(LwM2mServerEndpointsProvider end
*/
public LeshanServer build() {
if (registrationStore == null)
registrationStore = new InMemoryRegistrationStore();
registrationStore = new CustomInMemoryRegistrationStore();
if (authorizer == null)
authorizer = new DefaultAuthorizer(securityStore);
if (modelProvider == null)
Expand Down
Loading

0 comments on commit 172e023

Please sign in to comment.