From 8a4e915fe1273e181d44cd152bfcb09446944b18 Mon Sep 17 00:00:00 2001 From: Lawrence <1934378145@qq.com> Date: Thu, 14 Jan 2021 23:51:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9catalog=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E8=BF=98=E6=98=AF=E5=93=8D=E5=BA=94=E7=9A=84=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../transmit/request/impl/MessageRequestProcessor.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/MessageRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/MessageRequestProcessor.java index 1860ec7a..9ad928d6 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/MessageRequestProcessor.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/MessageRequestProcessor.java @@ -162,11 +162,13 @@ public class MessageRequestProcessor extends SIPRequestAbstractProcessor { private void processMessageCatalogList(RequestEvent evt) { try { Element rootElement = getRootElement(evt); + String name = rootElement.getName(); Element deviceIdElement = rootElement.element("DeviceID"); String deviceId = deviceIdElement.getText(); Element deviceListElement = rootElement.element("DeviceList"); - if (deviceListElement == null) { // 存在DeviceList则为响应 catalog, 不存在DeviceList则为查询请求 - // TODO 后续将代码拆分 + // if (deviceListElement == null) { // 存在DeviceList则为响应 catalog, 不存在DeviceList则为查询请求 + if (name == "Query") { // 区分是Response——查询响应,还是Query——查询请求 + // TODO 后续将代码拆分 ParentPlatform parentPlatform = storager.queryParentPlatById(deviceId); if (parentPlatform == null) { response404Ack(evt);