Merge pull request #5741 from thingsboard/lwm2m_bs_BC68
lwm2m: BootstrapRead_fix_bug
This commit is contained in:
commit
3ab3c0caa2
@ -84,7 +84,7 @@ public class LwM2MBootstrapConfigStoreTaskProvider implements BootstrapTaskProvi
|
|||||||
this.initAfterBootstrapDiscover(discoverResponse);
|
this.initAfterBootstrapDiscover(discoverResponse);
|
||||||
findSecurityInstanceId(discoverResponse.getObjectLinks());
|
findSecurityInstanceId(discoverResponse.getObjectLinks());
|
||||||
} else {
|
} else {
|
||||||
log.info(
|
log.warn(
|
||||||
"Bootstrap Discover return error {} : to continue bootstrap session without autoIdForSecurityObject mode. {}",
|
"Bootstrap Discover return error {} : to continue bootstrap session without autoIdForSecurityObject mode. {}",
|
||||||
discoverResponse, session);
|
discoverResponse, session);
|
||||||
}
|
}
|
||||||
@ -100,7 +100,13 @@ public class LwM2MBootstrapConfigStoreTaskProvider implements BootstrapTaskProvi
|
|||||||
return tasks;
|
return tasks;
|
||||||
}
|
}
|
||||||
BootstrapReadResponse readResponse = (BootstrapReadResponse) previousResponse.get(0);
|
BootstrapReadResponse readResponse = (BootstrapReadResponse) previousResponse.get(0);
|
||||||
findServerInstanceId(readResponse);
|
if (readResponse.isSuccess()) {
|
||||||
|
findServerInstanceId(readResponse);
|
||||||
|
} else {
|
||||||
|
log.warn(
|
||||||
|
"Bootstrap ReadResponse return error {} : to continue bootstrap session without find Server Instance Id. {}",
|
||||||
|
readResponse, session);
|
||||||
|
}
|
||||||
// create requests from config
|
// create requests from config
|
||||||
tasks.requestsToSend = this.toRequests(config,
|
tasks.requestsToSend = this.toRequests(config,
|
||||||
config.contentFormat != null ? config.contentFormat : session.getContentFormat());
|
config.contentFormat != null ? config.contentFormat : session.getContentFormat());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user