修改catalog请求还是响应的判断方法

This commit is contained in:
Lawrence 2021-01-14 23:51:59 +08:00
parent 49b14dd70e
commit 3b54426439

View File

@ -162,10 +162,12 @@ 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则为查询请求
// if (deviceListElement == null) { // 存在DeviceList则为响应 catalog 不存在DeviceList则为查询请求
if (name == "Query") { // 区分是Response查询响应还是Query查询请求
// TODO 后续将代码拆分
ParentPlatform parentPlatform = storager.queryParentPlatById(deviceId);
if (parentPlatform == null) {