Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FmclientUi
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
0
Merge Requests
0
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
shuai.liu
FmclientUi
Commits
35bcde59
Commit
35bcde59
authored
Feb 14, 2019
by
刘帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 修改冲正逻辑,去掉控制信息发送、校验冲正返回结果
2. 添加版权信息
parent
c1dc8f8f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
5 deletions
+61
-5
app_single.h
+8
-1
qfmclient.cpp
+19
-3
qfmclient.h
+13
-1
scanner.h
+7
-0
utility.h
+7
-0
widget.h
+7
-0
No files found.
app_single.h
View file @
35bcde59
#
ifndef
APP_SINGLE
// app_single.h
//
// Copyright (c) 2015-2019 Freemud Co., Ltd.
//
// Distributed under the OpenSSL Software License.
// (See accompanying file at https://github.com/openssl/openssl/blob/master/LICENSE)
#ifndef APP_SINGLE
#define APP_SINGLE
#if defined WIN32 //for win
...
...
qfmclient.cpp
View file @
35bcde59
...
...
@@ -1031,6 +1031,7 @@ void QFmClient::run()
CloseSocket
(
&
_acceptedSock
);
continue
;
}
//CloseSocket(&_acceptedSock); //test roll back
QJsonObject
object
;
char
temp_recv
[
MAX_BUF_LEN
]
=
{
0
};
strcpy
(
temp_recv
,
_recvbuf
);
...
...
@@ -1280,14 +1281,14 @@ void QFmClient::CheckRollBackData()
QLOG_INFO
()
<<
"roll back data: connect ZH Proxy failed, will try after 5 seconds...
\r\n
"
;
continue
;
}
#ifndef AES_ENCRYPT
if
(
0
!=
SendCtrlInfo2Proxy
())
{
qDebug
()
<<
"roll back data: send ctrl info 2 ZH Proxy failed, will try after 5 seconds...
\r\n
"
;
QLOG_INFO
()
<<
"roll back data: send ctrl info 2 ZH Proxy failed, will try after 5 seconds...
\r\n
"
;
continue
;
}
#endif
if
(
0
!=
SendData2ZhProxyAndWaitRspData
())
{
qDebug
()
<<
"roll back data: send data to proxy fail, will try after 5 seconds...
\r\n
"
;
...
...
@@ -1295,7 +1296,22 @@ void QFmClient::CheckRollBackData()
continue
;
}
break
;
//对冲正结果进行判断
QByteArray
recvdata
(
_recvbuf
);
QLOG_INFO
()
<<
"roll back reply: "
<<
_recvbuf
;
QJsonParseError
json_error
;
QJsonDocument
doc
=
QJsonDocument
::
fromJson
(
recvdata
,
&
json_error
);
if
(
json_error
.
error
!=
QJsonParseError
::
NoError
||
!
doc
.
isObject
())
{
qDebug
()
<<
"error request json data!
\r\n
"
;
continue
;
}
QJsonObject
object
=
doc
.
object
();
if
(
object
.
contains
(
"statusCode"
))
//{"statusCode":100}
{
if
(
object
[
"statusCode"
]
==
100
)
break
;
}
}
while
(
1
);
qDebug
()
<<
"roll back ok!
\r\n
"
;
...
...
qfmclient.h
View file @
35bcde59
#
ifndef
QFMCLIENT_H
// qfmclient.h
//
// Copyright (c) 2015-2019 Freemud Co., Ltd.
//
// This is the main control flow file.
// we wait the connection from NewPos, Once has request from NewPos, preprocess the request.
// Then send the request to proxy and wait the response.
// After get the response from proxy, send the response to NewPos.
//
// Distributed under the OpenSSL Software License.
// (See accompanying file at https://github.com/openssl/openssl/blob/master/LICENSE)
#ifndef QFMCLIENT_H
#define QFMCLIENT_H
#include <QThread>
...
...
scanner.h
View file @
35bcde59
// scanner.h
//
// Copyright (c) 2015-2019 Freemud Co., Ltd.
//
// Distributed under the OpenSSL Software License.
// (See accompanying file at https://github.com/openssl/openssl/blob/master/LICENSE)
#ifndef SCANNER_H
#define SCANNER_H
...
...
utility.h
View file @
35bcde59
// utility.h
//
// Copyright (c) 2015-2019 Freemud Co., Ltd.
//
// Distributed under the OpenSSL Software License.
// (See accompanying file at https://github.com/openssl/openssl/blob/master/LICENSE)
#ifndef UTILITY
#define UTILITY
...
...
widget.h
View file @
35bcde59
// widget.h
//
// Copyright (c) 2015-2019 Freemud Co., Ltd.
//
// Distributed under the OpenSSL Software License.
// (See accompanying file at https://github.com/openssl/openssl/blob/master/LICENSE)
#ifndef WIDGET_H
#define WIDGET_H
...
...
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