Showing
1 changed file
with
2 additions
and
3 deletions
@@ -407,14 +407,13 @@ public class DefaultLwM2MUplinkMsgHandler extends LwM2MExecutorAwareService impl | @@ -407,14 +407,13 @@ public class DefaultLwM2MUplinkMsgHandler extends LwM2MExecutorAwareService impl | ||
407 | LwM2mClient lwM2MClient = this.clientContext.getClientByEndpoint(registration.getEndpoint()); | 407 | LwM2mClient lwM2MClient = this.clientContext.getClientByEndpoint(registration.getEndpoint()); |
408 | 408 | ||
409 | if (LwM2MClientState.REGISTERED.equals(lwM2MClient.getState())) { | 409 | if (LwM2MClientState.REGISTERED.equals(lwM2MClient.getState())) { |
410 | - Lwm2mDeviceProfileTransportConfiguration deviceProfile = clientContext.getProfile(lwM2MClient.getProfileId()); | ||
411 | - | ||
412 | PowerMode powerMode = lwM2MClient.getPowerMode(); | 410 | PowerMode powerMode = lwM2MClient.getPowerMode(); |
413 | if (powerMode == null) { | 411 | if (powerMode == null) { |
412 | + Lwm2mDeviceProfileTransportConfiguration deviceProfile = clientContext.getProfile(lwM2MClient.getProfileId()); | ||
414 | powerMode = deviceProfile.getClientLwM2mSettings().getPowerMode(); | 413 | powerMode = deviceProfile.getClientLwM2mSettings().getPowerMode(); |
415 | } | 414 | } |
416 | 415 | ||
417 | - if (powerMode.equals(PowerMode.PSM) || powerMode.equals(PowerMode.E_DRX)) { | 416 | + if (PowerMode.PSM.equals(powerMode) || PowerMode.E_DRX.equals(powerMode)) { |
418 | initAttributes(lwM2MClient); | 417 | initAttributes(lwM2MClient); |
419 | TransportProtos.TransportToDeviceActorMsg toDeviceActorMsg = TransportProtos.TransportToDeviceActorMsg | 418 | TransportProtos.TransportToDeviceActorMsg toDeviceActorMsg = TransportProtos.TransportToDeviceActorMsg |
420 | .newBuilder() | 419 | .newBuilder() |