From 07a8ef9e256c70a3a5b15782add81dcad1e2ffc2 Mon Sep 17 00:00:00 2001
From: panlinlin <648540858@qq.com>
Date: 星期五, 14 六月 2024 00:03:57 +0800
Subject: [PATCH] SIP只有一个监听时,直接返回

---
 src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java
index f386c33..b87684a 100755
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java
@@ -6,8 +6,8 @@
 import com.genersoft.iot.vmp.gb28181.event.record.RecordEndEvent;
 import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent;
 import com.genersoft.iot.vmp.gb28181.event.subscribe.mobilePosition.MobilePositionEvent;
-import com.genersoft.iot.vmp.media.event.MediaServerOfflineEvent;
-import com.genersoft.iot.vmp.media.event.MediaServerOnlineEvent;
+import com.genersoft.iot.vmp.media.event.mediaServer.MediaServerOfflineEvent;
+import com.genersoft.iot.vmp.media.event.mediaServer.MediaServerOnlineEvent;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.ApplicationEventPublisher;
 import org.springframework.stereotype.Component;
@@ -79,7 +79,7 @@
 			// 鏁版嵁鍘婚噸
 			Set<String> gbIdSet = new HashSet<>();
 			for (DeviceChannel deviceChannel : deviceChannels) {
-				if (!gbIdSet.contains(deviceChannel.getChannelId())) {
+				if (deviceChannel != null && deviceChannel.getChannelId() != null && !gbIdSet.contains(deviceChannel.getChannelId())) {
 					gbIdSet.add(deviceChannel.getChannelId());
 					channels.add(deviceChannel);
 				}

--
Gitblit v1.8.0