Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gamera_videos_no_ui
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liusq
gamera_videos_no_ui
Commits
8f978a25
Commit
8f978a25
authored
Sep 26, 2024
by
“liusq”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改请求远程配置超时问题
parent
8bd021ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
12 deletions
+9
-12
HttpService.cpp
+1
-1
Httpclient.cpp
+1
-1
mainwindow.cpp
+7
-10
No files found.
HttpService.cpp
View file @
8f978a25
...
...
@@ -161,7 +161,7 @@ vides_data::response *HttpService::httpFindCameras(QString &serialNumber,vides_d
}
else
{
qInfo
()
<<
m_httpClient
.
errorCode
();
resp
->
code
=
2
;
resp
->
msg
=
OPERATION_FAILED
;
resp
->
msg
=
m_httpClient
.
errorCode
()
;
}
return
resp
;
}
...
...
Httpclient.cpp
View file @
8f978a25
...
...
@@ -7,7 +7,7 @@ HttpClient::HttpClient(QObject *parent)
{
m_networkAccessManager
=
new
QNetworkAccessManager
(
this
);
m_timer
=
new
QTimer
(
this
);
m_timer
->
setInterval
(
6
000
);
m_timer
->
setInterval
(
8
000
);
m_timer
->
setSingleShot
(
true
);
connect
(
m_timer
,
SIGNAL
(
timeout
()),
&
m_eventLoop
,
SLOT
(
quit
()));
}
...
...
mainwindow.cpp
View file @
8f978a25
...
...
@@ -500,10 +500,10 @@ void MainWindow::startCamera(const QString &httpurl){
}
vides_data
::
responseConfig
cloudConfig
;
httpService
.
setHttpUrl
(
httpurl
);
vides_data
::
response
*
res_config
=
http
Service
.
httpDeviceConfig
(
serialNumber
,
cloudConfig
);
HttpService
http_config
(
httpurl
);
vides_data
::
response
*
res_config
=
http
_config
.
httpDeviceConfig
(
serialNumber
,
cloudConfig
);
if
(
res_config
->
code
!=
0
){
qInfo
()
<<
"请求远程商户配置失败"
;
qInfo
()
<<
"请求远程商户配置失败"
<<
res_config
->
msg
<<
res_config
->
code
;
instace
.
deleteObj
(
res_config
);
return
;
}
...
...
@@ -516,12 +516,10 @@ void MainWindow::startCamera(const QString &httpurl){
QString
ipAddress
=
QString
(
"%1.%2.%3.%4"
).
arg
(
localDevice
->
HostIP
.
c
[
0
]).
arg
(
localDevice
->
HostIP
.
c
[
1
]).
arg
(
localDevice
->
HostIP
.
c
[
2
]).
arg
(
localDevice
->
HostIP
.
c
[
3
]);
//this->gatewayRandomIp(ipAddress);
QString
key
=
ipAddress
+
":"
+
QString
::
number
(
localDevice
->
TCPPort
);
httpService
.
setHttpUrl
(
httpurl
);
HttpService
http_device
(
httpurl
);
vides_data
::
responseConfig
devConfig
;
vides_data
::
response
*
devRes
=
http
Ser
vice
.
httpDeviceConfig
(
device
.
sSn
,
devConfig
);
vides_data
::
response
*
devRes
=
http
_de
vice
.
httpDeviceConfig
(
device
.
sSn
,
devConfig
);
if
(
devRes
->
code
!=
0
){
qInfo
()
<<
"请求相机配置失败"
;
instace
.
deleteObj
(
devRes
);
...
...
@@ -581,9 +579,8 @@ void MainWindow::startCamera(const QString &httpurl){
// 清空 localDevices 容器
localDevices
.
clear
();
}
httpService
.
setHttpUrl
(
httpurl
);
vides_data
::
response
*
res
=
httpService
.
httpPostDeviceStatus
(
reStatus
);
HttpService
http_div
(
httpurl
);
vides_data
::
response
*
res
=
http_div
.
httpPostDeviceStatus
(
reStatus
);
if
(
res
->
code
!=
0
){
qInfo
()
<<
"盒子状态上报失败 code:"
<<
res
->
code
<<
"msg:"
<<
res
->
msg
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment