Merge pull request #5878 from YevhenBondarenko/fix/improvements
[3.3.3] correct sending lwm2m logs / device update improvements
This commit is contained in:
commit
d1053dd7ee
@ -35,7 +35,6 @@ public class TbLwM2MReadCallback extends TbLwM2MUplinkTargetedCallback<ReadReque
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(ReadRequest request, ReadResponse response) {
|
public void onSuccess(ReadRequest request, ReadResponse response) {
|
||||||
logForBadResponse(response.getCode().getCode(), responseToString(response), request.getClass().getSimpleName());
|
logForBadResponse(response.getCode().getCode(), responseToString(response), request.getClass().getSimpleName());
|
||||||
super.onSuccess(request, response);
|
|
||||||
handler.onUpdateValueAfterReadResponse(client.getRegistration(), versionedId, response);
|
handler.onUpdateValueAfterReadResponse(client.getRegistration(), versionedId, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,7 @@ public abstract class TbLwM2MTargetedCallback<R, T> extends AbstractTbLwM2MReque
|
|||||||
@Override
|
@Override
|
||||||
public void onSuccess(R request, T response) {
|
public void onSuccess(R request, T response) {
|
||||||
//TODO convert camelCase to "camel case" using .split("(?<!(^|[A-Z]))(?=[A-Z])|(?<!^)(?=[A-Z][a-z])")
|
//TODO convert camelCase to "camel case" using .split("(?<!(^|[A-Z]))(?=[A-Z])|(?<!^)(?=[A-Z][a-z])")
|
||||||
if (response instanceof LwM2mResponse && !(response instanceof ReadResponse)) {
|
if (response instanceof LwM2mResponse) {
|
||||||
logForBadResponse(((LwM2mResponse) response).getCode().getCode(), response.toString(), request.getClass().getSimpleName());
|
logForBadResponse(((LwM2mResponse) response).getCode().getCode(), response.toString(), request.getClass().getSimpleName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -957,7 +957,7 @@ public class DefaultTransportService implements TransportService {
|
|||||||
if ((md.getSessionInfo().getDeviceIdMSB() == deviceIdMSB && md.getSessionInfo().getDeviceIdLSB() == deviceIdLSB)) {
|
if ((md.getSessionInfo().getDeviceIdMSB() == deviceIdMSB && md.getSessionInfo().getDeviceIdLSB() == deviceIdLSB)) {
|
||||||
DeviceProfile newDeviceProfile;
|
DeviceProfile newDeviceProfile;
|
||||||
if (md.getSessionInfo().getDeviceProfileIdMSB() != deviceProfileIdMSB
|
if (md.getSessionInfo().getDeviceProfileIdMSB() != deviceProfileIdMSB
|
||||||
&& md.getSessionInfo().getDeviceProfileIdLSB() != deviceProfileIdLSB) {
|
|| md.getSessionInfo().getDeviceProfileIdLSB() != deviceProfileIdLSB) {
|
||||||
//TODO: if transport types are different - we should close the session.
|
//TODO: if transport types are different - we should close the session.
|
||||||
newDeviceProfile = deviceProfileCache.get(new DeviceProfileId(new UUID(deviceProfileIdMSB, deviceProfileIdLSB)));
|
newDeviceProfile = deviceProfileCache.get(new DeviceProfileId(new UUID(deviceProfileIdMSB, deviceProfileIdLSB)));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user