From a70e327a8efaf38d74911ea568419a087fbd235a Mon Sep 17 00:00:00 2001
From: lawrencehj <1934378145@qq.com>
Date: 星期四, 15 四月 2021 11:42:05 +0800
Subject: [PATCH] 修改用户密码前先验证旧密码,增加安全性

---
 src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRunner.java |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRunner.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRunner.java
index 1340a68..6e0bc60 100644
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRunner.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMRunner.java
@@ -8,7 +8,7 @@
 import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
 //import com.genersoft.iot.vmp.storager.IVideoManagerStorager;
 import com.genersoft.iot.vmp.storager.IVideoManagerStorager;
-import com.genersoft.iot.vmp.vmanager.service.IStreamProxyService;
+import com.genersoft.iot.vmp.service.IStreamProxyService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -75,9 +75,8 @@
 
     @Override
     public void run(String... strings) throws Exception {
-        JSONObject subscribeKey = new JSONObject();
         // 璁㈤槄 zlm鍚姩浜嬩欢
-        hookSubscribe.addSubscribe(ZLMHttpHookSubscribe.HookType.on_server_started,subscribeKey,(response)->{
+        hookSubscribe.addSubscribe(ZLMHttpHookSubscribe.HookType.on_server_started,null,(response)->{
             MediaServerConfig mediaServerConfig = JSONObject.toJavaObject(response, MediaServerConfig.class);
             zLmRunning(mediaServerConfig);
         });
@@ -124,7 +123,7 @@
         param.put("ffmpeg.cmd","%s -fflags nobuffer -rtsp_transport tcp -i %s -c:a aac -strict -2 -ar 44100 -ab 48k -c:v libx264  -f flv %s");
         param.put("hook.enable","1");
         param.put("hook.on_flow_report","");
-        param.put("hook.on_play","");
+        param.put("hook.on_play",String.format("%s/on_play", hookPrex));
         param.put("hook.on_http_access","");
         param.put("hook.on_publish",String.format("%s/on_publish", hookPrex));
         param.put("hook.on_record_mp4","");
@@ -155,7 +154,7 @@
         logger.info("zlm鎺ュ叆鎴愬姛...");
         if (autoConfig) saveZLMConfig();
         MediaServerConfig mediaInfo = redisCatchStorage.getMediaInfo();
-        if (System.currentTimeMillis() - mediaInfo.getUpdateTime() < 50){
+        if (mediaInfo != null && System.currentTimeMillis() - mediaInfo.getUpdateTime() < 50){
             logger.info("zlm鍒氬垰鏇存柊锛屽拷鐣ヨ繖娆℃洿鏂�");
             return;
         }

--
Gitblit v1.8.0