From 0dfce85d2f981c1793472468ace0773af9f30e01 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 15 三月 2022 15:40:15 +0800
Subject: [PATCH] 必须提前在zlm上配置port_range属性,不然自动配置此属性可能不成功
---
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/response/impl/RegisterResponseProcessor.java | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/response/impl/RegisterResponseProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/response/impl/RegisterResponseProcessor.java
index ffac1d0..6c33406 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/response/impl/RegisterResponseProcessor.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/response/impl/RegisterResponseProcessor.java
@@ -2,6 +2,7 @@
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatformCatch;
+import com.genersoft.iot.vmp.gb28181.bean.SubscribeHolder;
import com.genersoft.iot.vmp.gb28181.transmit.SIPProcessorObserver;
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
import com.genersoft.iot.vmp.gb28181.transmit.event.response.SIPResponseProcessorAbstract;
@@ -39,6 +40,9 @@
@Autowired
private SIPProcessorObserver sipProcessorObserver;
+
+ @Autowired
+ private SubscribeHolder subscribeHolder;
@Override
public void afterPropertiesSet() throws Exception {
@@ -83,20 +87,19 @@
// 娉ㄥ唽/娉ㄩ攢鎴愬姛
logger.info(String.format("%s %s鎴愬姛", platformGBId, action));
redisCatchStorage.delPlatformRegisterInfo(callId);
- parentPlatform.setStatus("娉ㄥ唽".equals(action));
+ redisCatchStorage.delPlatformCatchInfo(platformGBId);
// 鍙栧洖Expires璁剧疆锛岄伩鍏嶆敞閿�杩囩▼涓缃负0
- 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);
- }
+ ParentPlatform parentPlatformTmp = storager.queryParentPlatByServerGBId(platformGBId);
+ parentPlatformTmp.setStatus("娉ㄥ唽".equals(action));
+ redisCatchStorage.updatePlatformRegister(parentPlatformTmp);
+ redisCatchStorage.updatePlatformKeepalive(parentPlatformTmp);
+ parentPlatformCatch.setParentPlatform(parentPlatformTmp);
+ redisCatchStorage.updatePlatformCatchInfo(parentPlatformCatch);
storager.updateParentPlatformStatus(platformGBId, "娉ㄥ唽".equals(action));
-
+ if ("娉ㄩ攢".equals(action)) {
+ subscribeHolder.removeCatalogSubscribe(platformGBId);
+ subscribeHolder.removeMobilePositionSubscribe(platformGBId);
+ }
}
}
--
Gitblit v1.8.0