Lwm2m Fix bug Bootstrap Security URI
This commit is contained in:
parent
565cc29cbb
commit
e2b3f0f742
@ -160,7 +160,15 @@ public class LwM2MBootstrapSecurityStore implements BootstrapSecurityStore {
|
||||
BootstrapConfiguration bootstrapObject = getBootstrapParametersFromThingsboard(store.getDeviceProfile());
|
||||
lwM2MBootstrapConfig.servers = JacksonUtil.fromString(JacksonUtil.toString(bootstrapObject.getServers()), LwM2MBootstrapServers.class);
|
||||
LwM2MServerBootstrap profileServerBootstrap = JacksonUtil.fromString(JacksonUtil.toString(bootstrapObject.getBootstrapServer()), LwM2MServerBootstrap.class);
|
||||
if (SecurityMode.NO_SEC != profileServerBootstrap.getSecurityMode() && profileServerBootstrap != null) {
|
||||
profileServerBootstrap.setSecurityHost( profileServerBootstrap.getHost());
|
||||
profileServerBootstrap.setSecurityPort( profileServerBootstrap.getPort());
|
||||
}
|
||||
LwM2MServerBootstrap profileLwm2mServer = JacksonUtil.fromString(JacksonUtil.toString(bootstrapObject.getLwm2mServer()), LwM2MServerBootstrap.class);
|
||||
if (SecurityMode.NO_SEC != profileLwm2mServer.getSecurityMode() && profileLwm2mServer != null) {
|
||||
profileLwm2mServer.setSecurityHost(profileLwm2mServer.getHost());
|
||||
profileLwm2mServer.setSecurityPort(profileLwm2mServer.getPort());
|
||||
}
|
||||
UUID sessionUUiD = UUID.randomUUID();
|
||||
TransportProtos.SessionInfoProto sessionInfo = helper.getValidateSessionInfo(store.getMsg(), sessionUUiD.getMostSignificantBits(), sessionUUiD.getLeastSignificantBits());
|
||||
bsSessions.put(store.getEndpoint(), sessionInfo);
|
||||
|
||||
@ -218,7 +218,7 @@ public class LwM2mDefaultBootstrapSessionManager extends DefaultBootstrapSession
|
||||
}
|
||||
|
||||
private void sendLogs (String endpointName, String logMsg) {
|
||||
log.trace(logMsg);
|
||||
log.info(logMsg);
|
||||
transportService.log(((LwM2MBootstrapSecurityStore) bsSecurityStore).getSessionByEndpoint(endpointName), logMsg);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user