From 38980826f9789745c7288e2e9c800873315a9228 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Mon, 4 Mar 2024 14:32:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B9=B3=E5=8F=B0=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=97=B6=E6=9C=AA=E7=A7=BB=E9=99=A4=E5=BF=83=E8=B7=B3?= =?UTF-8?q?=E8=B6=85=E6=97=B6=E9=87=8D=E6=96=B0=E6=B3=A8=E5=86=8C=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E7=9A=84=E9=97=AE=E9=A2=98=20#1329?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/service/impl/PlatformServiceImpl.java | 14 ++++---------- .../gb28181/platform/PlatformController.java | 2 ++ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java index 26ebd707..e69fd280 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java @@ -7,7 +7,6 @@ import com.genersoft.iot.vmp.gb28181.bean.*; import com.genersoft.iot.vmp.gb28181.event.SipSubscribe; import com.genersoft.iot.vmp.gb28181.session.SSRCFactory; import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommanderFroPlatform; -import com.genersoft.iot.vmp.gb28181.utils.SipUtils; import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory; import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; import com.genersoft.iot.vmp.service.IMediaServerService; @@ -18,22 +17,18 @@ import com.genersoft.iot.vmp.storager.dao.*; import com.genersoft.iot.vmp.utils.DateUtil; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; -import gov.nist.javax.sip.message.SIPRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.sip.InvalidArgumentException; -import javax.sip.PeerUnavailableException; import javax.sip.SipException; -import javax.sip.SipFactory; -import javax.sip.address.Address; -import javax.sip.address.SipURI; -import javax.sip.header.*; -import javax.sip.message.Request; import java.text.ParseException; -import java.util.*; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; /** * @author lin @@ -366,7 +361,6 @@ public class PlatformServiceImpl implements IPlatformService { ()-> registerTask(platform, null), userSetting.getRegisterAgainAfterTime() * 1000); } - } } diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/PlatformController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/PlatformController.java index 471d3df5..97803f98 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/PlatformController.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/PlatformController.java @@ -239,6 +239,8 @@ public class PlatformController { if (parentPlatformCatch == null) { throw new ControllerException(ErrorCode.ERROR100.getCode(), "平台不存在"); } + parentPlatform.setEnable(false); + storager.updateParentPlatform(parentPlatform); // 发送离线消息,无论是否成功都删除缓存 try { commanderForPlatform.unregister(parentPlatform, parentPlatformCatch.getSipTransactionInfo(), (event -> {