Commit 41616f726dafafe7c015bf4f3e02a7aa9488a3a2

Authored by 648540858
1 parent a45bb7d9

修复导入通道时无平台关联时的bug

src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
... ... @@ -563,6 +563,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
563 563  
564 564 @Override
565 565 public void streamByeCmd(ParentPlatform platform, String callId) {
  566 + if (platform == null) {
  567 + return;
  568 + }
566 569 SendRtpItem sendRtpItem = redisCatchStorage.querySendRTPServer(platform.getServerGBId(), null, null, callId);
567 570 if (sendRtpItem != null) {
568 571 String mediaServerId = sendRtpItem.getMediaServerId();
... ...
src/main/java/com/genersoft/iot/vmp/service/impl/StreamPushServiceImpl.java
... ... @@ -413,12 +413,15 @@ public class StreamPushServiceImpl implements IStreamPushService {
413 413  
414 414 }
415 415 }
416   - platformGbStreamMapper.batchAdd(streamPushItemListFroPlatform);
417   - // 发送通知
418   - for (String platformId : platformForEvent.keySet()) {
419   - eventPublisher.catalogEventPublishForStream(
420   - platformId, platformForEvent.get(platformId), CatalogEvent.ADD);
  416 + if (streamPushItemListFroPlatform.size() > 0) {
  417 + platformGbStreamMapper.batchAdd(streamPushItemListFroPlatform);
  418 + // 发送通知
  419 + for (String platformId : platformForEvent.keySet()) {
  420 + eventPublisher.catalogEventPublishForStream(
  421 + platformId, platformForEvent.get(platformId), CatalogEvent.ADD);
  422 + }
421 423 }
  424 +
422 425 }
423 426 }
424 427  
... ...