From d883ec2891210b7e9361557b11e435c892528901 Mon Sep 17 00:00:00 2001
From: pansen <pansen626@sina.com>
Date: 星期五, 15 三月 2019 14:52:41 +0800
Subject: [PATCH] 修改刷新底图的ip变量重名问题。
---
QiaoJiaSystem/DataManagerServer/http_configserver.cpp | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/QiaoJiaSystem/DataManagerServer/http_configserver.cpp b/QiaoJiaSystem/DataManagerServer/http_configserver.cpp
index 0750366..64595d9 100644
--- a/QiaoJiaSystem/DataManagerServer/http_configserver.cpp
+++ b/QiaoJiaSystem/DataManagerServer/http_configserver.cpp
@@ -3343,18 +3343,18 @@
if (reader.parse(content, value)) {
std::string str_imgName = "";
+ std::string rtsp_ip = value["str_ip"].asString();
+// int port= value["n_port"].asInt();
+ int port = 554;
+ std::string username = value["str_username"].asString();
+ std::string pass = value["str_password"].asString();
+ std::string brand = value["str_brand"].asString();
+ std::string rtsp_url = rtspAddrBuild(rtsp_ip, port, username, pass, brand);
if (value.isMember("id")) {
if (value["id"].isNull()) return "{\"ret_status\": \"id鍐呭鏈夎锛岃妫�鏌ワ紒\"}";
str_imgName.append("./").append(value["id"].asString()).append(".jpg");
} else {
- std::string ip = value["str_ip"].asString();
-// int port= value["n_port"].asInt();
- int port = 554;
- std::string username = value["str_username"].asString();
- std::string pass = value["str_password"].asString();
- std::string brand = value["str_brand"].asString();
- std::string rtsp_url = rtspAddrBuild(ip, port, username, pass, brand);
if (rtsp_url.empty()) {
return "{\"ret_status\":\"鍐呭鏈夎锛岃妫�鏌ワ紒\"}";
}
@@ -3373,7 +3373,7 @@
if (str_imgName.back() != '/') {
str_imgName.push_back('/');
}
- str_imgName += ip;
+ str_imgName += rtsp_ip;
str_imgName += "-";
str_imgName += "snapshot.jpg";
//admin:a1234567@192.168.1.201:554/h264/ch1/main/av_stream -r 1/25 -f image2 -s 1920*1080 /home/basic/work_src/a.jpg
@@ -3406,7 +3406,7 @@
fdfsClient.rwLock.unlock();
Json::Value result;
result["imgUrl"] = strImgUrl;
- db_c.updateCamDevSnapshot(QString::fromStdString(ip), QString::fromStdString(strImgUrl));
+ db_c.updateCamDevSnapshot(QString::fromStdString(rtsp_ip), QString::fromStdString(strImgUrl));
return result.toStyledString();
--
Gitblit v1.8.0