From 8985905bbe9307cbe10b49d9efec082eebb45ada Mon Sep 17 00:00:00 2001 From: koisi <kor.coeo@gmail.com> Date: 星期一, 05 八月 2024 17:06:00 +0800 Subject: [PATCH] Merge pull request #1 from koisi-io/fix2 --- src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java b/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java index 6d99120..afdbb49 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/SipLayer.java @@ -82,7 +82,9 @@ monitorIps.add(sipConfig.getIp()); } } - sipConfig.setShowIp(String.join(",", monitorIps)); + if (ObjectUtils.isEmpty(sipConfig.getShowIp())){ + sipConfig.setShowIp(String.join(",", monitorIps)); + } SipFactory.getInstance().setPathName("gov.nist"); if (monitorIps.size() > 0) { for (String monitorIp : monitorIps) { @@ -139,11 +141,11 @@ } public SipProviderImpl getUdpSipProvider(String ip) { - if (ObjectUtils.isEmpty(ip)) { - return null; - } if (udpSipProviderMap.size() == 1) { return udpSipProviderMap.values().stream().findFirst().get(); + } + if (ObjectUtils.isEmpty(ip)) { + return null; } return udpSipProviderMap.get(ip); } @@ -163,12 +165,12 @@ } public SipProviderImpl getTcpSipProvider(String ip) { - if (ObjectUtils.isEmpty(ip)) { - return null; - } if (tcpSipProviderMap.size() == 1) { return tcpSipProviderMap.values().stream().findFirst().get(); } + if (ObjectUtils.isEmpty(ip)) { + return null; + } return tcpSipProviderMap.get(ip); } -- Gitblit v1.8.0