648540858
2022-03-07 b2c953fc76de2a9686ee81d5311bd9b06e453912
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/response/impl/RegisterResponseProcessor.java
@@ -78,26 +78,25 @@
      if (response.getStatusCode() == 401) {
         WWWAuthenticateHeader www = (WWWAuthenticateHeader)response.getHeader(WWWAuthenticateHeader.NAME);
         sipCommanderForPlatform.register(parentPlatform, callId, www, null, null);
         sipCommanderForPlatform.register(parentPlatform, callId, www, null, null, true);
      }else if (response.getStatusCode() == 200){
         // 注册/注销成功
         logger.info(String.format("%s %s成功", platformGBId, action));
         redisCatchStorage.delPlatformRegisterInfo(callId);
         parentPlatform.setStatus("注册".equals(action));
         // 取回Expires设置,避免注销过程中被置为0
         ParentPlatform parentPlatformTmp = storager.queryParentPlatByServerGBId(platformGBId);
         String expires = parentPlatformTmp.getExpires();
         parentPlatform.setExpires(expires);
         parentPlatform.setId(parentPlatformTmp.getId());
         if (!parentPlatformCatch.getParentPlatform().getExpires().equals("0")) {
            ParentPlatform parentPlatformTmp = storager.queryParentPlatByServerGBId(platformGBId);
            String expires = parentPlatformTmp.getExpires();
            parentPlatform.setExpires(expires);
            parentPlatform.setId(parentPlatformTmp.getId());
            redisCatchStorage.updatePlatformRegister(parentPlatform);
            redisCatchStorage.updatePlatformKeepalive(parentPlatform);
            parentPlatformCatch.setParentPlatform(parentPlatform);
            redisCatchStorage.updatePlatformCatchInfo(parentPlatformCatch);
         }
         storager.updateParentPlatformStatus(platformGBId, "注册".equals(action));
         redisCatchStorage.updatePlatformRegister(parentPlatform);
         redisCatchStorage.updatePlatformKeepalive(parentPlatform);
         parentPlatformCatch.setParentPlatform(parentPlatform);
         redisCatchStorage.updatePlatformCatchInfo(parentPlatformCatch);
      }
   }