From 5bcd8495e03b08ff417f74f816d20e028f9b1fe0 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期日, 20 二月 2022 16:22:43 +0800
Subject: [PATCH] 兼容海康不规范的xml,大幅度提高通道分页查询速度,优化节点的保活。
---
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
index 4216bb8..b83e70b 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
@@ -370,10 +370,7 @@
@Override
public boolean sendNotifyForCatalogAddOrUpdate(String type, ParentPlatform parentPlatform, List<DeviceChannel> deviceChannels, SubscribeInfo subscribeInfo) {
- if (parentPlatform == null) {
- return false;
- }
- if (deviceChannels == null || deviceChannels.size() == 0) {
+ if (parentPlatform == null || deviceChannels == null || deviceChannels.size() == 0 || subscribeInfo == null) {
return false;
}
for (DeviceChannel channel : deviceChannels) {
@@ -418,7 +415,7 @@
Request request = headerProviderPlarformProvider.createNotifyRequest(parentPlatform, catalogXml.toString(), subscribeInfo.getToTag(), subscribeInfo.getFromTag(), callIdHeader);
transmitRequest(parentPlatform, request);
- Thread.sleep(100);
+ Thread.sleep(10);
} catch (SipException | ParseException | InvalidArgumentException e) {
e.printStackTrace();
return false;
@@ -431,10 +428,10 @@
@Override
public boolean sendNotifyForCatalogOther(String type, ParentPlatform parentPlatform, List<DeviceChannel> deviceChannels, SubscribeInfo subscribeInfo) {
- if (parentPlatform == null) {
- return false;
- }
- if (deviceChannels == null || deviceChannels.size() == 0) {
+ if (parentPlatform == null
+ || deviceChannels == null
+ || deviceChannels.size() == 0
+ || subscribeInfo == null) {
return false;
}
@@ -462,7 +459,7 @@
Request request = headerProviderPlarformProvider.createNotifyRequest(parentPlatform, catalogXml.toString(), subscribeInfo.getToTag(), subscribeInfo.getFromTag(), callIdHeader);
transmitRequest(parentPlatform, request);
- Thread.sleep(100);
+ Thread.sleep(200);
} catch (SipException | ParseException | InvalidArgumentException e) {
e.printStackTrace();
return false;
--
Gitblit v1.8.0