Commit 102aad1f5dc4d4cbe776502b62c4d860adae20c3
1 parent
363606d8
判空
Showing
1 changed file
with
6 additions
and
4 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/response/impl/RegisterResponseProcessor.java
| @@ -90,10 +90,12 @@ public class RegisterResponseProcessor extends SIPResponseProcessorAbstract { | @@ -90,10 +90,12 @@ public class RegisterResponseProcessor extends SIPResponseProcessorAbstract { | ||
| 90 | redisCatchStorage.delPlatformCatchInfo(platformGBId); | 90 | redisCatchStorage.delPlatformCatchInfo(platformGBId); |
| 91 | // 取回Expires设置,避免注销过程中被置为0 | 91 | // 取回Expires设置,避免注销过程中被置为0 |
| 92 | ParentPlatform parentPlatformTmp = storager.queryParentPlatByServerGBId(platformGBId); | 92 | ParentPlatform parentPlatformTmp = storager.queryParentPlatByServerGBId(platformGBId); |
| 93 | - parentPlatformTmp.setStatus("注册".equals(action)); | ||
| 94 | - redisCatchStorage.updatePlatformRegister(parentPlatformTmp); | ||
| 95 | - redisCatchStorage.updatePlatformKeepalive(parentPlatformTmp); | ||
| 96 | - parentPlatformCatch.setParentPlatform(parentPlatformTmp); | 93 | + if (parentPlatformTmp != null) { |
| 94 | + parentPlatformTmp.setStatus("注册".equals(action)); | ||
| 95 | + redisCatchStorage.updatePlatformRegister(parentPlatformTmp); | ||
| 96 | + redisCatchStorage.updatePlatformKeepalive(parentPlatformTmp); | ||
| 97 | + parentPlatformCatch.setParentPlatform(parentPlatformTmp); | ||
| 98 | + } | ||
| 97 | redisCatchStorage.updatePlatformCatchInfo(parentPlatformCatch); | 99 | redisCatchStorage.updatePlatformCatchInfo(parentPlatformCatch); |
| 98 | storager.updateParentPlatformStatus(platformGBId, "注册".equals(action)); | 100 | storager.updateParentPlatformStatus(platformGBId, "注册".equals(action)); |
| 99 | if ("注销".equals(action)) { | 101 | if ("注销".equals(action)) { |