diff --git a/README.md b/README.md
index 7ba443fe1..1b8b985c7 100644
--- a/README.md
+++ b/README.md
@@ -163,6 +163,7 @@ QQ私信一般不回, 精力有限.欢迎大家在群里讨论.觉得项目对
[hotcoffie](https://github.com/hotcoffie) [xiaomu](https://github.com/nikmu) [TristingChen](https://github.com/TristingChen)
[chenparty](https://github.com/chenparty) [Hotleave](https://github.com/hotleave) [ydwxb](https://github.com/ydwxb)
[ydpd](https://github.com/ydpd) [szy833](https://github.com/szy833) [ydwxb](https://github.com/ydwxb) [Albertzhu666](https://github.com/Albertzhu666)
+[mk1990](https://github.com/mk1990)
ps: 刚增加了这个名单,肯定遗漏了一些大佬,欢迎大佬联系我添加。
diff --git a/pom.xml b/pom.xml
index 1546e39cc..9ad41c7f1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -159,9 +159,10 @@
com.alibaba
fastjson
- 1.2.73
+ 1.2.83
+
com.squareup.okhttp3
diff --git a/src/main/java/com/genersoft/iot/vmp/conf/security/LoginSuccessHandler.java b/src/main/java/com/genersoft/iot/vmp/conf/security/LoginSuccessHandler.java
index 9690c6d1e..2d7e8a1b0 100644
--- a/src/main/java/com/genersoft/iot/vmp/conf/security/LoginSuccessHandler.java
+++ b/src/main/java/com/genersoft/iot/vmp/conf/security/LoginSuccessHandler.java
@@ -11,6 +11,9 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
+/**
+ * @author lin
+ */
@Component
public class LoginSuccessHandler implements AuthenticationSuccessHandler {
diff --git a/src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java b/src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java
index 47cfdaba4..a4bbdbac6 100644
--- a/src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java
+++ b/src/main/java/com/genersoft/iot/vmp/conf/security/WebSecurityConfig.java
@@ -20,6 +20,7 @@ import java.util.List;
/**
* 配置Spring Security
+ * @author lin
*/
@Configuration
@EnableWebSecurity
@@ -132,15 +133,19 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.anyRequest().authenticated()
// 异常处理(权限拒绝、登录失效等)
.and().exceptionHandling()
- .authenticationEntryPoint(anonymousAuthenticationEntryPoint)//匿名用户访问无权限资源时的异常处理
+ //匿名用户访问无权限资源时的异常处理
+ .authenticationEntryPoint(anonymousAuthenticationEntryPoint)
// .accessDeniedHandler(accessDeniedHandler)//登录用户没有权限访问资源
- // 登入
- .and().formLogin().permitAll()//允许所有用户
- .successHandler(loginSuccessHandler)//登录成功处理逻辑
- .failureHandler(loginFailureHandler)//登录失败处理逻辑
+ // 登入 允许所有用户
+ .and().formLogin().permitAll()
+ //登录成功处理逻辑
+ .successHandler(loginSuccessHandler)
+ //登录失败处理逻辑
+ .failureHandler(loginFailureHandler)
// 登出
- .and().logout().logoutUrl("/api/user/logout").permitAll()//允许所有用户
- .logoutSuccessHandler(logoutHandler)//登出成功处理逻辑
+ .and().logout().logoutUrl("/api/user/logout").permitAll()
+ //登出成功处理逻辑
+ .logoutSuccessHandler(logoutHandler)
.deleteCookies("JSESSIONID")
// 会话管理
// .and().sessionManagement().invalidSessionStrategy(invalidSessionHandler) // 超时处理
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/session/VideoStreamSessionManager.java b/src/main/java/com/genersoft/iot/vmp/gb28181/session/VideoStreamSessionManager.java
index 85bc39dc7..a22d24d68 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/session/VideoStreamSessionManager.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/session/VideoStreamSessionManager.java
@@ -99,8 +99,8 @@ public class VideoStreamSessionManager {
return dialog;
}
- public SIPDialog getDialogByCallId(String deviceId, String channelId, String callID){
- SsrcTransaction ssrcTransaction = getSsrcTransaction(deviceId, channelId, callID, null);
+ public SIPDialog getDialogByCallId(String deviceId, String channelId, String callId){
+ SsrcTransaction ssrcTransaction = getSsrcTransaction(deviceId, channelId, callId, null);
if (ssrcTransaction == null) {
return null;
}
@@ -108,11 +108,17 @@ public class VideoStreamSessionManager {
if (dialogByteArray == null) {
return null;
}
- SIPDialog dialog = (SIPDialog)SerializeUtils.deSerialize(dialogByteArray);
- return dialog;
+ return (SIPDialog)SerializeUtils.deSerialize(dialogByteArray);
}
public SsrcTransaction getSsrcTransaction(String deviceId, String channelId, String callId, String stream){
+
+ if (StringUtils.isEmpty(deviceId)) {
+ deviceId ="*";
+ }
+ if (StringUtils.isEmpty(channelId)) {
+ channelId ="*";
+ }
if (StringUtils.isEmpty(callId)) {
callId ="*";
}
@@ -179,7 +185,7 @@ public class VideoStreamSessionManager {
public List getAllSsrc() {
- List