Commit 5761b59ffd26a889257c2f0d7d9a5f82981faac1

Authored by xp.Huang
2 parents ad826a9a 1ac7355d

Merge branch 'master_dev_gtb281810301' into 'master_dev'

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

See merge request yunteng/thingskit!356
... ... @@ -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");
... ...