fixed changing device profile in device

This commit is contained in:
YevhenBondarenko 2022-01-13 16:55:23 +02:00
parent 8193669266
commit 97a4e7b423

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 {