Browse Source

修复注册是数据传输模式被回复默认

pull/93/head
panlinlin 4 years ago
parent
commit
b92027f31e
  1. 9
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/RegisterRequestProcessor.java

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

@ -116,9 +116,12 @@ public class RegisterRequestProcessor extends SIPRequestAbstractProcessor {
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 = new Device(); device = storager.queryVideoDevice(deviceId);
device.setStreamMode("UDP"); if (device == null) {
device.setDeviceId(deviceId); device = new Device();
device.setStreamMode("UDP");
device.setDeviceId(deviceId);
}
device.setIp(received); device.setIp(received);
device.setPort(rPort); device.setPort(rPort);
device.setHostAddress(received.concat(":").concat(String.valueOf(rPort))); device.setHostAddress(received.concat(":").concat(String.valueOf(rPort)));

Loading…
Cancel
Save