修复数据错误导致无法转成JSON返回 #919
This commit is contained in:
@@ -244,6 +244,9 @@ public class Device {
|
||||
}
|
||||
|
||||
public Integer getStreamModeForParam() {
|
||||
if (streamMode == null) {
|
||||
return 0;
|
||||
}
|
||||
if (streamMode.equalsIgnoreCase("UDP")) {
|
||||
return 0;
|
||||
}else if (streamMode.equalsIgnoreCase("TCP-PASSIVE")) {
|
||||
|
||||
@@ -166,7 +166,18 @@ public class RegisterRequestProcessor extends SIPRequestProcessorParent implemen
|
||||
device.setGeoCoordSys("WGS84");
|
||||
device.setDeviceId(deviceId);
|
||||
device.setOnLine(false);
|
||||
}else {
|
||||
if (ObjectUtils.isEmpty(device.getStreamMode())) {
|
||||
device.setStreamMode("UDP");
|
||||
}
|
||||
if (ObjectUtils.isEmpty(device.getCharset())) {
|
||||
device.setCharset("GB2312");
|
||||
}
|
||||
if (ObjectUtils.isEmpty(device.getGeoCoordSys())) {
|
||||
device.setGeoCoordSys("WGS84");
|
||||
}
|
||||
}
|
||||
|
||||
device.setIp(remoteAddressInfo.getIp());
|
||||
device.setPort(remoteAddressInfo.getPort());
|
||||
device.setHostAddress(remoteAddressInfo.getIp().concat(":").concat(String.valueOf(remoteAddressInfo.getPort())));
|
||||
|
||||
Reference in New Issue
Block a user