Commit 1ac7355d6773d793d1962ffadafe6df421eee84a

Authored by 芯火源
1 parent ad826a9a

fix: GBT28181协议接入的设备增加协议校验

... ... @@ -643,12 +643,15 @@ public class SIPProcessorObserver extends SIPRequestProcessorParent
643 643 responseAck(request, Response.FORBIDDEN, "设备密码错误");
644 644 return;
645 645 }
  646 + DeviceProfile profile = msg.getDeviceProfile();
  647 + if(profile.getTransportType() != DeviceTransportType.GBT28181){
  648 + return;
  649 + }
646 650 GbtDeviceSessionCtx deviceSessionCtx =
647 651 deviceSessions.computeIfAbsent(
648 652 camaraId, val -> new GbtDeviceSessionCtx(UUID.randomUUID(), context));
649   - // DeviceProfile profile = msg.getDeviceProfile();
650 653 deviceSessionCtx.setDeviceInfo(msg.getDeviceInfo());
651   - deviceSessionCtx.setDeviceProfile(msg.getDeviceProfile());
  654 + deviceSessionCtx.setDeviceProfile(profile);
652 655 deviceSessionCtx.setCharset("GB2312");
653 656 deviceSessionCtx.setGeoCoordSys("WGS84");
654 657 deviceSessionCtx.setTreeType("CivilCode");
... ...