From b92027f31ef24583e8b9d4c2dc44c7e9262a2023 Mon Sep 17 00:00:00 2001 From: panlinlin <648540858@qq.com> Date: Mon, 26 Apr 2021 10:48:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B3=A8=E5=86=8C=E6=98=AF?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=BC=A0=E8=BE=93=E6=A8=A1=E5=BC=8F=E8=A2=AB?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E9=BB=98=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../transmit/request/impl/RegisterRequestProcessor.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/RegisterRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/RegisterRequestProcessor.java index 22d54a71..c2884702 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/RegisterRequestProcessor.java +++ b/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(); SipUri uri = (SipUri) address.getURI(); String deviceId = uri.getUser(); - device = new Device(); - device.setStreamMode("UDP"); - device.setDeviceId(deviceId); + device = storager.queryVideoDevice(deviceId); + if (device == null) { + device = new Device(); + device.setStreamMode("UDP"); + device.setDeviceId(deviceId); + } device.setIp(received); device.setPort(rPort); device.setHostAddress(received.concat(":").concat(String.valueOf(rPort)));