From dc328b9eeb59426f6ab8660bae5d4fcb00ea2031 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Wed, 16 Mar 2022 17:46:24 +0800 Subject: [PATCH] #393 --- .../iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderProvider.java | 1 + .../java/com/genersoft/iot/vmp/storager/dao/GbStreamMapper.java | 2 +- .../iot/vmp/storager/impl/VideoManagerStoragerImpl.java | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderProvider.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderProvider.java index cb208a32..5d5deae1 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderProvider.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderProvider.java @@ -230,6 +230,7 @@ public class SIPRequestHeaderProvider { Request request = null; if (streamInfo == null) return null; Dialog dialog = streamSession.getDialogByStream(streamInfo.getDeviceID(), streamInfo.getChannelId(), streamInfo.getStream()); + if (dialog == null) return null; SipURI requestLine = sipFactory.createAddressFactory().createSipURI(device.getDeviceId(), device.getHostAddress()); diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/GbStreamMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/GbStreamMapper.java index 4ed0a0c2..9ac90bbe 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/GbStreamMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/GbStreamMapper.java @@ -33,7 +33,7 @@ public interface GbStreamMapper { "mediaServerId=#{mediaServerId}," + "status=${status} " + "WHERE app=#{app} AND stream=#{stream}") - int updateByallAndStream(GbStream gbStream); + int updateByAppAndStream(GbStream gbStream); @Update("UPDATE gb_stream " + "SET app=#{app}," + diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java index 158a163e..687b10ad 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java @@ -772,7 +772,7 @@ public class VideoManagerStoragerImpl implements IVideoManagerStorager { try { if (streamProxyMapper.update(streamProxyItem) > 0) { if (!StringUtils.isEmpty(streamProxyItem.getGbId())) { - if (gbStreamMapper.updateByallAndStream(streamProxyItem) > 0) { + if (gbStreamMapper.updateByAppAndStream(streamProxyItem) == 0) { //事务回滚 dataSourceTransactionManager.rollback(transactionStatus); return false;