Merge pull request #5878 from YevhenBondarenko/fix/improvements

[3.3.3] correct sending lwm2m logs / device update improvements
This commit is contained in:
Andrew Shvayka 2022-01-13 17:16:23 +02:00 committed by GitHub
commit d1053dd7ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 3 deletions

View File

@ -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);
} }

View File

@ -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());
} }
} }

View File

@ -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 {