Browse Source

修复推流生成通道未通知上级平台的问题,添加注册时清楚脏数据。

pull/317/head
648540858 3 years ago
parent
commit
6ba8ab22b5
  1. 9
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/RegisterRequestProcessor.java
  2. 4
      src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java

9
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/RegisterRequestProcessor.java

@ -90,8 +90,13 @@ public class RegisterRequestProcessor extends SIPRequestProcessorParent implemen
AddressImpl address = (AddressImpl) fromHeader.getAddress(); AddressImpl address = (AddressImpl) fromHeader.getAddress();
SipUri uri = (SipUri) address.getURI(); SipUri uri = (SipUri) address.getURI();
String deviceId = uri.getUser(); String deviceId = uri.getUser();
Device device = redisCatchStorage.getDevice(deviceId); Device deviceInRedis = redisCatchStorage.getDevice(deviceId);
AuthorizationHeader authorhead = (AuthorizationHeader) request.getHeader(AuthorizationHeader.NAME); Device device = storager.queryVideoDevice(deviceId);
if (deviceInRedis != null && device == null) {
// redis 存在脏数据
redisCatchStorage.clearCatchByDeviceId(deviceId);
}
AuthorizationHeader authorhead = (AuthorizationHeader) request.getHeader(AuthorizationHeader.NAME);
// 校验密码是否正确 // 校验密码是否正确
if (authorhead != null) { if (authorhead != null) {
passwordCorrect = new DigestServerAuthenticationHelper().doAuthenticatePlainTextPassword(request, passwordCorrect = new DigestServerAuthenticationHelper().doAuthenticatePlainTextPassword(request,

4
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java

@ -814,9 +814,11 @@ public class VideoManagerStoragerImpl implements IVideoManagerStorager {
streamPushItem.setCatalogId(parentPlatform.getCatalogId()); streamPushItem.setCatalogId(parentPlatform.getCatalogId());
streamPushItem.setPlatformId(parentPlatform.getServerGBId()); streamPushItem.setPlatformId(parentPlatform.getServerGBId());
String stream = streamPushItem.getStream(); String stream = streamPushItem.getStream();
StreamProxyItem streamProxyItems = platformGbStreamMapper.selectOne(streamPushItem.getApp(), stream, parentPlatform.getServerGBId()); StreamProxyItem streamProxyItems = platformGbStreamMapper.selectOne(streamPushItem.getApp(), stream,
parentPlatform.getServerGBId());
if (streamProxyItems == null) { if (streamProxyItems == null) {
platformGbStreamMapper.add(streamPushItem); platformGbStreamMapper.add(streamPushItem);
eventPublisher.catalogEventPublishForStream(parentPlatform.getServerGBId(), streamPushItem, CatalogEvent.ADD);
} }
} }
} }

Loading…
Cancel
Save