From 60ea2fc372324c678819e38274235bfe9fc581e1 Mon Sep 17 00:00:00 2001 From: shikong <919411476@qq.com> Date: Tue, 3 Oct 2023 16:38:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=9B=AE=E5=BD=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=20key=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processor/message/request/MessageRequestProcessor.java | 2 +- .../skcks/docking/gb28181/service/catalog/CatalogService.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gb28181-service/src/main/java/cn/skcks/docking/gb28181/core/sip/message/processor/message/request/MessageRequestProcessor.java b/gb28181-service/src/main/java/cn/skcks/docking/gb28181/core/sip/message/processor/message/request/MessageRequestProcessor.java index e4590f0..80d3f1b 100644 --- a/gb28181-service/src/main/java/cn/skcks/docking/gb28181/core/sip/message/processor/message/request/MessageRequestProcessor.java +++ b/gb28181-service/src/main/java/cn/skcks/docking/gb28181/core/sip/message/processor/message/request/MessageRequestProcessor.java @@ -82,7 +82,7 @@ public class MessageRequestProcessor implements MessageProcessor { () -> log.warn("对应订阅 {} 已结束, 异常数据 => {}", key, dto)); }else if(messageDto.getCmdType().equalsIgnoreCase(CmdType.CATALOG)){ CatalogResponseDTO catalogResponseDTO = MANSCDPUtils.parse(content, CatalogResponseDTO.class); - String key = GenericSubscribe.Helper.getKey(catalogResponseDTO.getDeviceId(), catalogResponseDTO.getSn()); + String key = GenericSubscribe.Helper.getKey(CmdType.CATALOG,catalogResponseDTO.getDeviceId(), catalogResponseDTO.getSn()); Optional.ofNullable(subscribe.getSipRequestSubscribe().getPublisher(key)).ifPresent(publisher->{ publisher.submit(request); }); diff --git a/gb28181-service/src/main/java/cn/skcks/docking/gb28181/service/catalog/CatalogService.java b/gb28181-service/src/main/java/cn/skcks/docking/gb28181/service/catalog/CatalogService.java index 1c3c097..c1ae3ef 100644 --- a/gb28181-service/src/main/java/cn/skcks/docking/gb28181/service/catalog/CatalogService.java +++ b/gb28181-service/src/main/java/cn/skcks/docking/gb28181/service/catalog/CatalogService.java @@ -1,6 +1,7 @@ package cn.skcks.docking.gb28181.service.catalog; import cn.skcks.docking.gb28181.config.sip.SipConfig; +import cn.skcks.docking.gb28181.constant.CmdType; import cn.skcks.docking.gb28181.core.sip.message.request.SipRequestBuilder; import cn.skcks.docking.gb28181.core.sip.message.subscribe.GenericSubscribe; import cn.skcks.docking.gb28181.core.sip.message.subscribe.SipSubscribe; @@ -64,7 +65,7 @@ public class CatalogService { .sn(sn) .build(); Request request = requestBuilder.createMessageRequest(callId, cSeq, MANSCDPUtils.toByteXml(catalogQueryDTO)); - String key = GenericSubscribe.Helper.getKey(gbDeviceId,sn); + String key = GenericSubscribe.Helper.getKey(CmdType.CATALOG, gbDeviceId, sn); subscribe.getSipRequestSubscribe().addPublisher(key, 60, TimeUnit.SECONDS); subscribe.getSipRequestSubscribe().addSubscribe(key, new Flow.Subscriber<>() { private Flow.Subscription subscription;