qsocks5socketengine.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/network/socket/qsocks5socketengine.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7static const int MaxWriteBufferSize = 128*1024;-
8static inline QString s5StateToString(QSocks5SocketEnginePrivate::Socks5State) { return
never executed: return QString();
QString();
never executed: return QString();
}
0
9static inline QString dump(const QByteArray &) { return
never executed: return QString();
QString();
never executed: return QString();
}
0
10-
11-
12-
13-
14-
15-
16static bool qt_socks5_set_host_address_and_port(const QHostAddress &address, quint16 port, QByteArray *pBuf)-
17{-
18 if (0) QMessageLogger(__FILE__, 156, __PRETTY_FUNCTION__).debug() << "setting [" << address << ':' << port << ']';
dead code: QMessageLogger(__FILE__, 156, __PRETTY_FUNCTION__).debug() << "setting [" << address << ':' << port << ']';
-
19-
20 union {-
21 quint16 port;-
22 quint32 ipv4;-
23 QIPv6Address ipv6;-
24 char ptr;-
25 } data;-
26-
27-
28 if (address.protocol() == QAbstractSocket::IPv4Protocol
address.protoc...::IPv4ProtocolDescription
TRUEevaluated 246 times by 4 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
1-246
29 data.ipv4 = qToBigEndian<quint32>(address.toIPv4Address());-
30 pBuf->append(0x01);-
31 pBuf->append(QByteArray::fromRawData(&data.ptr, sizeof data.ipv4));-
32 }
executed 246 times by 4 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
else if (address.protocol() == QAbstractSocket::IPv6Protocol
address.protoc...::IPv6ProtocolDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEnever evaluated
) {
0-246
33 data.ipv6 = address.toIPv6Address();-
34 pBuf->append(0x04);-
35 pBuf->append(QByteArray::fromRawData(&data.ptr, sizeof data.ipv6));-
36 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_qsocks5socketengine - unknown status
else {
1
37 return
never executed: return false;
false;
never executed: return false;
0
38 }-
39-
40-
41 data.port = qToBigEndian<quint16>(port);-
42 pBuf->append(QByteArray::fromRawData(&data.ptr, sizeof data.port));-
43 return
executed 247 times by 4 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
true;
executed 247 times by 4 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
247
44}-
45-
46-
47-
48-
49static bool qt_socks5_set_host_name_and_port(const QString &hostname, quint16 port, QByteArray *pBuf)-
50{-
51 if (0) QMessageLogger(__FILE__, 189, __PRETTY_FUNCTION__).debug() << "setting [" << hostname << ':' << port << ']';
dead code: QMessageLogger(__FILE__, 189, __PRETTY_FUNCTION__).debug() << "setting [" << hostname << ':' << port << ']';
-
52-
53 QByteArray encodedHostName = QUrl::toAce(hostname);-
54 QByteArray &buf = *pBuf;-
55-
56 if (encodedHostName.length() > 255
encodedHostName.length() > 255Description
TRUEnever evaluated
FALSEevaluated 457 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
)
0-457
57 return
never executed: return false;
false;
never executed: return false;
0
58-
59 buf.append(0x03);-
60 buf.append(uchar(encodedHostName.length()));-
61 buf.append(encodedHostName);-
62-
63-
64 union {-
65 quint16 port;-
66 char ptr;-
67 } data;-
68 data.port = qToBigEndian<quint16>(port);-
69 buf.append(QByteArray::fromRawData(&data.ptr, sizeof data.port));-
70-
71 return
executed 457 times by 7 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
true;
executed 457 times by 7 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
457
72}-
73-
74-
75-
76-
77-
78-
79-
80static int qt_socks5_get_host_address_and_port(const QByteArray &buf, QHostAddress *pAddress, quint16 *pPort, int *pPos)-
81{-
82 int ret = -1;-
83 int pos = *pPos;-
84 const unsigned char *pBuf = reinterpret_cast<const unsigned char*>(buf.constData());-
85 QHostAddress address;-
86 quint16 port = 0;-
87-
88 if (buf.size() - pos < 1
buf.size() - pos < 1Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 693 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
) {
4-693
89 if (0) QMessageLogger(__FILE__, 227, __PRETTY_FUNCTION__).debug() << "need more data address/port";
dead code: QMessageLogger(__FILE__, 227, __PRETTY_FUNCTION__).debug() << "need more data address/port";
-
90 return
executed 4 times by 1 test: return 0;
Executed by:
  • tst_qsocks5socketengine - unknown status
0;
executed 4 times by 1 test: return 0;
Executed by:
  • tst_qsocks5socketengine - unknown status
4
91 }-
92 if (pBuf[pos] == 0x01
pBuf[pos] == 0x01Description
TRUEevaluated 639 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 54 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
54-639
93 pos++;-
94 if (buf.size() - pos < 4
buf.size() - pos < 4Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 631 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
) {
8-631
95 if (0) QMessageLogger(__FILE__, 233, __PRETTY_FUNCTION__).debug() << "need more data for ip4 address";
dead code: QMessageLogger(__FILE__, 233, __PRETTY_FUNCTION__).debug() << "need more data for ip4 address";
-
96 return
executed 8 times by 1 test: return 0;
Executed by:
  • tst_qsocks5socketengine - unknown status
0;
executed 8 times by 1 test: return 0;
Executed by:
  • tst_qsocks5socketengine - unknown status
8
97 }-
98 address.setAddress(qFromBigEndian<quint32>(&pBuf[pos]));-
99 pos += 4;-
100 ret = 1;-
101 }
executed 631 times by 7 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
else if (pBuf[pos] == 0x04
pBuf[pos] == 0x04Description
TRUEevaluated 54 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEnever evaluated
) {
0-631
102 pos++;-
103 if (buf.size() - pos < 16
buf.size() - pos < 16Description
TRUEevaluated 32 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
22-32
104 if (0) QMessageLogger(__FILE__, 242, __PRETTY_FUNCTION__).debug() << "need more data for ip6 address";
dead code: QMessageLogger(__FILE__, 242, __PRETTY_FUNCTION__).debug() << "need more data for ip6 address";
-
105 return
executed 32 times by 1 test: return 0;
Executed by:
  • tst_qsocks5socketengine - unknown status
0;
executed 32 times by 1 test: return 0;
Executed by:
  • tst_qsocks5socketengine - unknown status
32
106 }-
107 QIPv6Address add;-
108 for (int i = 0; i < 16
i < 16Description
TRUEevaluated 352 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 22 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
; ++i)
22-352
109 add[i] = buf[pos++];
executed 352 times by 1 test: add[i] = buf[pos++];
Executed by:
  • tst_qsocks5socketengine - unknown status
352
110 address.setAddress(add);-
111 ret = 1;-
112 }
executed 22 times by 1 test: end of block
Executed by:
  • tst_qsocks5socketengine - unknown status
else if (pBuf[pos] == 0x03
pBuf[pos] == 0x03Description
TRUEnever evaluated
FALSEnever evaluated
){
0-22
113-
114 pos++;-
115 QMessageLogger(__FILE__, 253, __PRETTY_FUNCTION__).debug() << "skipping hostname of len" << uint(pBuf[pos]);-
116 pos += uchar(pBuf[pos]);-
117 }
never executed: end of block
else {
0
118 if (0) QMessageLogger(__FILE__, 256, __PRETTY_FUNCTION__).debug() << "invalid address type" << (int)pBuf[pos];
dead code: QMessageLogger(__FILE__, 256, __PRETTY_FUNCTION__).debug() << "invalid address type" << (int)pBuf[pos];
-
119 ret = -1;-
120 }
never executed: end of block
0
121-
122 if (ret == 1
ret == 1Description
TRUEevaluated 653 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
) {
0-653
123 if (buf.size() - pos < 2
buf.size() - pos < 2Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 649 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
) {
4-649
124 if (0) QMessageLogger(__FILE__, 262, __PRETTY_FUNCTION__).debug() << "need more data for port";
dead code: QMessageLogger(__FILE__, 262, __PRETTY_FUNCTION__).debug() << "need more data for port";
-
125 return
executed 4 times by 1 test: return 0;
Executed by:
  • tst_qsocks5socketengine - unknown status
0;
executed 4 times by 1 test: return 0;
Executed by:
  • tst_qsocks5socketengine - unknown status
4
126 }-
127 port = qFromBigEndian<quint16>(&pBuf[pos]);-
128 pos += 2;-
129 }
executed 649 times by 7 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
649
130-
131 if (ret == 1
ret == 1Description
TRUEevaluated 649 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
) {
0-649
132 if (0) QMessageLogger(__FILE__, 270, __PRETTY_FUNCTION__).debug() << "got [" << address << ':' << port << ']';
dead code: QMessageLogger(__FILE__, 270, __PRETTY_FUNCTION__).debug() << "got [" << address << ':' << port << ']';
-
133 *pAddress = address;-
134 *pPort = port;-
135 *pPos = pos;-
136 }
executed 649 times by 7 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
649
137-
138 return
executed 649 times by 7 tests: return ret;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
ret;
executed 649 times by 7 tests: return ret;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
649
139}-
140-
141struct QSocks5Data-
142{-
143 QTcpSocket *controlSocket;-
144 QSocks5Authenticator *authenticator;-
145};-
146-
147struct QSocks5ConnectData : public QSocks5Data-
148{-
149 QByteArray readBuffer;-
150};-
151-
152struct QSocks5BindData : public QSocks5Data-
153{-
154 QHostAddress localAddress;-
155 quint16 localPort;-
156 QHostAddress peerAddress;-
157 quint16 peerPort;-
158 QElapsedTimer timeStamp;-
159};-
160-
161struct QSocks5RevivedDatagram-
162{-
163 QByteArray data;-
164 QHostAddress address;-
165 quint16 port;-
166};-
167-
168-
169struct QSocks5UdpAssociateData : public QSocks5Data-
170{-
171 QUdpSocket *udpSocket;-
172 QHostAddress associateAddress;-
173 quint16 associatePort;-
174 QQueue<QSocks5RevivedDatagram> pendingDatagrams;-
175};-
176-
177-
178-
179class QSocks5BindStore : public QObject-
180{-
181public:-
182 QSocks5BindStore();-
183 ~QSocks5BindStore();-
184-
185 void add(qintptr socketDescriptor, QSocks5BindData *bindData);-
186 bool contains(qintptr socketDescriptor);-
187 QSocks5BindData *retrieve(qintptr socketDescriptor);-
188-
189protected:-
190 void timerEvent(QTimerEvent * event) override;-
191-
192 QMutex mutex;-
193 int sweepTimerId;-
194-
195 QHash<int, QSocks5BindData *> store;-
196};-
197-
198namespace { namespace Q_QGS_socks5BindStore { typedef QSocks5BindStore Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEevaluated 17 times by 17 tests
Evaluated by:
  • tst_qeventloop - unknown status
  • tst_qftp - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworksession - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpserver - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
executed 17 times by 17 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_qeventloop - unknown status
  • tst_qftp - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworksession - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpserver - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
}
executed 17 times by 17 tests: end of block
Executed by:
  • tst_qeventloop - unknown status
  • tst_qftp - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworksession - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpserver - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlsimplereader - unknown status
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return
executed 1011 times by 18 tests: return &holder.value;
Executed by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
&holder.value;
executed 1011 times by 18 tests: return &holder.value;
Executed by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
} } } static QGlobalStatic<QSocks5BindStore, Q_QGS_socks5BindStore::innerFunction, Q_QGS_socks5BindStore::guard> socks5BindStore;
0-1011
199-
200QSocks5BindStore::QSocks5BindStore()-
201 : mutex(QMutex::Recursive)-
202 , sweepTimerId(-1)-
203{-
204 QCoreApplication *app = QCoreApplication::instance();-
205 if (app
appDescription
TRUEevaluated 18 times by 18 tests
Evaluated by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEnever evaluated
&& app->thread() != thread()
app->thread() != thread()Description
TRUEevaluated 3 times by 3 tests
Evaluated by:
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qxmlsimplereader - unknown status
FALSEevaluated 15 times by 15 tests
Evaluated by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
)
0-18
206 moveToThread(app->thread());
executed 3 times by 3 tests: moveToThread(app->thread());
Executed by:
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qxmlsimplereader - unknown status
3
207}
executed 18 times by 18 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
18
208-
209QSocks5BindStore::~QSocks5BindStore()-
210{-
211}-
212-
213void QSocks5BindStore::add(qintptr socketDescriptor, QSocks5BindData *bindData)-
214{-
215 QMutexLocker lock(&mutex);-
216 if (store.contains(socketDescriptor)
store.contains...ketDescriptor)Description
TRUEnever evaluated
FALSEevaluated 6 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
) {
0-6
217-
218 }
never executed: end of block
0
219 bindData->timeStamp.start();-
220 store.insert(socketDescriptor, bindData);-
221-
222 if (sweepTimerId == -1
sweepTimerId == -1Description
TRUEevaluated 6 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
FALSEnever evaluated
)
0-6
223 sweepTimerId = startTimer(60000);
executed 6 times by 3 tests: sweepTimerId = startTimer(60000);
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
6
224}
executed 6 times by 3 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
6
225-
226bool QSocks5BindStore::contains(qintptr socketDescriptor)-
227{-
228 QMutexLocker lock(&mutex);-
229 return
executed 999 times by 18 tests: return store.contains(socketDescriptor);
Executed by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
store.contains(socketDescriptor);
executed 999 times by 18 tests: return store.contains(socketDescriptor);
Executed by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
999
230}-
231-
232QSocks5BindData *QSocks5BindStore::retrieve(qintptr socketDescriptor)-
233{-
234 QMutexLocker lock(&mutex);-
235 const auto it = store.constFind(socketDescriptor);-
236 if (it == store.cend()
it == store.cend()Description
TRUEnever evaluated
FALSEevaluated 6 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
)
0-6
237 return
never executed: return 0;
0;
never executed: return 0;
0
238 QSocks5BindData *bindData = it.value();-
239 store.erase(it);-
240 if (bindData
bindDataDescription
TRUEevaluated 6 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
FALSEnever evaluated
) {
0-6
241 if (bindData->controlSocket->thread() != QThread::currentThread()
bindData->cont...urrentThread()Description
TRUEnever evaluated
FALSEevaluated 6 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
) {
0-6
242 QMessageLogger(__FILE__, 380, __PRETTY_FUNCTION__).warning("Can not access socks5 bind data from different thread");-
243 return
never executed: return 0;
0;
never executed: return 0;
0
244 }-
245 }
executed 6 times by 3 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
else {
6
246 if (0) QMessageLogger(__FILE__, 384, __PRETTY_FUNCTION__).debug() << "__ERROR__ binddata == 0";
dead code: QMessageLogger(__FILE__, 384, __PRETTY_FUNCTION__).debug() << "__ERROR__ binddata == 0";
-
247 }
never executed: end of block
0
248-
249 if (store.isEmpty()
store.isEmpty()Description
TRUEevaluated 6 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
FALSEnever evaluated
) {
0-6
250 killTimer(sweepTimerId);-
251 sweepTimerId = -1;-
252 }
executed 6 times by 3 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
6
253 return
executed 6 times by 3 tests: return bindData;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
bindData;
executed 6 times by 3 tests: return bindData;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
6
254}-
255-
256void QSocks5BindStore::timerEvent(QTimerEvent * event)-
257{-
258 QMutexLocker lock(&mutex);-
259 if (event->timerId() == sweepTimerId
event->timerId...= sweepTimerIdDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
260 if (0) QMessageLogger(__FILE__, 398, __PRETTY_FUNCTION__).debug() << "QSocks5BindStore performing sweep";
dead code: QMessageLogger(__FILE__, 398, __PRETTY_FUNCTION__).debug() << "QSocks5BindStore performing sweep";
-
261 for (auto it = store.begin(), end = store.end(); it != end
it != endDescription
TRUEnever evaluated
FALSEnever evaluated
;) {
0
262 if (it.value()->timeStamp.hasExpired(350000)
it.value()->ti...xpired(350000)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
263 if (0) QMessageLogger(__FILE__, 401, __PRETTY_FUNCTION__).debug() << "QSocks5BindStore removing JJJJ";
dead code: QMessageLogger(__FILE__, 401, __PRETTY_FUNCTION__).debug() << "QSocks5BindStore removing JJJJ";
-
264 it = store.erase(it);-
265 }
never executed: end of block
else {
0
266 ++it;-
267 }
never executed: end of block
0
268 }-
269 }
never executed: end of block
0
270}
never executed: end of block
0
271-
272QSocks5Authenticator::QSocks5Authenticator()-
273{-
274}-
275-
276QSocks5Authenticator::~QSocks5Authenticator()-
277{-
278}-
279-
280char QSocks5Authenticator::methodId()-
281{-
282 return
executed 653 times by 9 tests: return 0x00;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
0x00;
executed 653 times by 9 tests: return 0x00;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
653
283}-
284-
285bool QSocks5Authenticator::beginAuthenticate(QTcpSocket *socket, bool *completed)-
286{-
287 (void)socket;;-
288 *completed = true;-
289 return
never executed: return true;
true;
never executed: return true;
0
290}-
291-
292bool QSocks5Authenticator::continueAuthenticate(QTcpSocket *socket, bool *completed)-
293{-
294 (void)socket;;-
295 *completed = true;-
296 return
never executed: return true;
true;
never executed: return true;
0
297}-
298-
299bool QSocks5Authenticator::seal(const QByteArray &buf, QByteArray *sealedBuf)-
300{-
301 *sealedBuf = buf;-
302 return
executed 2591 times by 9 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
true;
executed 2591 times by 9 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2591
303}-
304-
305bool QSocks5Authenticator::unSeal(const QByteArray &sealedBuf, QByteArray *buf)-
306{-
307 *buf = sealedBuf;-
308 return
executed 3655 times by 8 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
true;
executed 3655 times by 8 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
3655
309}-
310-
311bool QSocks5Authenticator::unSeal(QTcpSocket *sealedSocket, QByteArray *buf)-
312{-
313 return
executed 3655 times by 8 tests: return unSeal(sealedSocket->readAll(), buf);
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
unSeal(sealedSocket->readAll(), buf);
executed 3655 times by 8 tests: return unSeal(sealedSocket->readAll(), buf);
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
3655
314}-
315-
316QSocks5PasswordAuthenticator::QSocks5PasswordAuthenticator(const QString &userName, const QString &password)-
317{-
318 this->userName = userName;-
319 this->password = password;-
320}
executed 147 times by 7 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
147
321-
322char QSocks5PasswordAuthenticator::methodId()-
323{-
324 return
executed 236 times by 7 tests: return 0x02;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
0x02;
executed 236 times by 7 tests: return 0x02;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
236
325}-
326-
327bool QSocks5PasswordAuthenticator::beginAuthenticate(QTcpSocket *socket, bool *completed)-
328{-
329 *completed = false;-
330 QByteArray uname = userName.toLatin1();-
331 QByteArray passwd = password.toLatin1();-
332 QByteArray dataBuf(3 + uname.size() + passwd.size(), 0);-
333 char *buf = dataBuf.data();-
334 int pos = 0;-
335 buf[pos++] = 0x01;-
336 buf[pos++] = uname.size();-
337 memcpy(&buf[pos], uname.data(), uname.size());-
338 pos += uname.size();-
339 buf[pos++] = passwd.size();-
340 memcpy(&buf[pos], passwd.data(), passwd.size());-
341 return
executed 89 times by 7 tests: return socket->write(dataBuf) == dataBuf.size();
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
socket->write(dataBuf) == dataBuf.size();
executed 89 times by 7 tests: return socket->write(dataBuf) == dataBuf.size();
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
89
342}-
343-
344bool QSocks5PasswordAuthenticator::continueAuthenticate(QTcpSocket *socket, bool *completed)-
345{-
346 *completed = false;-
347-
348 if (socket->bytesAvailable() < 2
socket->bytesAvailable() < 2Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 88 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
)
2-88
349 return
executed 2 times by 1 test: return true;
Executed by:
  • tst_qsocks5socketengine - unknown status
true;
executed 2 times by 1 test: return true;
Executed by:
  • tst_qsocks5socketengine - unknown status
2
350-
351 QByteArray buf = socket->read(2);-
352 if (buf.at(0) == 0x01
buf.at(0) == 0x01Description
TRUEevaluated 87 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
&& buf.at(1) == 0x00
buf.at(1) == 0x00Description
TRUEevaluated 87 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
) {
0-87
353 *completed = true;-
354 return
executed 87 times by 7 tests: return true;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
true;
executed 87 times by 7 tests: return true;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
87
355 }-
356-
357-
358 socket->close();-
359 return
executed 1 time by 1 test: return false;
Executed by:
  • tst_qsocks5socketengine - unknown status
false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_qsocks5socketengine - unknown status
1
360}-
361-
362QString QSocks5PasswordAuthenticator::errorString()-
363{-
364 return
never executed: return QLatin1String("Socks5 user name or password incorrect");
QLatin1String("Socks5 user name or password incorrect");
never executed: return QLatin1String("Socks5 user name or password incorrect");
0
365}-
366-
367-
368-
369QSocks5SocketEnginePrivate::QSocks5SocketEnginePrivate()-
370 : socks5State(Uninitialized)-
371 , readNotificationEnabled(false)-
372 , writeNotificationEnabled(false)-
373 , exceptNotificationEnabled(false)-
374 , socketDescriptor(-1)-
375 , data(0)-
376 , connectData(0)-
377-
378 , udpData(0)-
379-
380 , bindData(0)-
381 , readNotificationActivated(false)-
382 , writeNotificationActivated(false)-
383 , readNotificationPending(false)-
384 , writeNotificationPending(false)-
385 , connectionNotificationPending(false)-
386{-
387 mode = NoMode;-
388}
executed 726 times by 9 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
726
389-
390QSocks5SocketEnginePrivate::~QSocks5SocketEnginePrivate()-
391{-
392}-
393-
394void QSocks5SocketEnginePrivate::initialize(Socks5Mode socks5Mode)-
395{-
396 QSocks5SocketEngine * const q = q_func();-
397-
398 mode = socks5Mode;-
399 if (mode == ConnectMode
mode == ConnectModeDescription
TRUEevaluated 704 times by 9 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 15 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
) {
15-704
400 connectData = new QSocks5ConnectData;-
401 data = connectData;-
402-
403 }
executed 704 times by 9 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
else if (mode == UdpAssociateMode
mode == UdpAssociateModeDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 13 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
) {
2-704
404 udpData = new QSocks5UdpAssociateData;-
405 data = udpData;-
406 udpData->udpSocket = new QUdpSocket(q);-
407-
408 udpData->udpSocket->setProperty("_q_networksession", q->property("_q_networksession"));-
409-
410 udpData->udpSocket->setProxy(QNetworkProxy::NoProxy);-
411 QObject::connect(udpData->udpSocket, qFlagLocation("2""readyRead()" "\0" __FILE__ ":" "549"),-
412 q, qFlagLocation("1""_q_udpSocketReadNotification()" "\0" __FILE__ ":" "550"),-
413 Qt::DirectConnection);-
414-
415 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qsocks5socketengine - unknown status
else if (mode == BindMode
mode == BindModeDescription
TRUEevaluated 13 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
FALSEnever evaluated
) {
0-13
416 bindData = new QSocks5BindData;-
417 data = bindData;-
418 }
executed 13 times by 3 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
13
419-
420 data->controlSocket = new QTcpSocket(q);-
421-
422 data->controlSocket->setProperty("_q_networksession", q->property("_q_networksession"));-
423-
424 data->controlSocket->setProxy(QNetworkProxy::NoProxy);-
425 QObject::connect(data->controlSocket, qFlagLocation("2""connected()" "\0" __FILE__ ":" "563"), q, qFlagLocation("1""_q_controlSocketConnected()" "\0" __FILE__ ":" "563"),-
426 Qt::DirectConnection);-
427 QObject::connect(data->controlSocket, qFlagLocation("2""readyRead()" "\0" __FILE__ ":" "565"), q, qFlagLocation("1""_q_controlSocketReadNotification()" "\0" __FILE__ ":" "565"),-
428 Qt::DirectConnection);-
429 QObject::connect(data->controlSocket, qFlagLocation("2""bytesWritten(qint64)" "\0" __FILE__ ":" "567"), q, qFlagLocation("1""_q_controlSocketBytesWritten()" "\0" __FILE__ ":" "567"),-
430 Qt::DirectConnection);-
431 QObject::connect(data->controlSocket, qFlagLocation("2""error(QAbstractSocket::SocketError)" "\0" __FILE__ ":" "569"),-
432 q, qFlagLocation("1""_q_controlSocketError(QAbstractSocket::SocketError)" "\0" __FILE__ ":" "570"),-
433 Qt::DirectConnection);-
434 QObject::connect(data->controlSocket, qFlagLocation("2""disconnected()" "\0" __FILE__ ":" "572"), q, qFlagLocation("1""_q_controlSocketDisconnected()" "\0" __FILE__ ":" "572"),-
435 Qt::DirectConnection);-
436 QObject::connect(data->controlSocket, qFlagLocation("2""stateChanged(QAbstractSocket::SocketState)" "\0" __FILE__ ":" "574"),-
437 q, qFlagLocation("1""_q_controlSocketStateChanged(QAbstractSocket::SocketState)" "\0" __FILE__ ":" "575"),-
438 Qt::DirectConnection);-
439-
440 if (!proxyInfo.user().isEmpty()
!proxyInfo.user().isEmpty()Description
TRUEevaluated 62 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 657 times by 9 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
|| !proxyInfo.password().isEmpty()
!proxyInfo.pas...rd().isEmpty()Description
TRUEnever evaluated
FALSEevaluated 657 times by 9 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
0-657
441 if (0) QMessageLogger(__FILE__, 579, __PRETTY_FUNCTION__).debug() << "using username/password authentication; user =" << proxyInfo.user();
dead code: QMessageLogger(__FILE__, 579, __PRETTY_FUNCTION__).debug() << "using username/password authentication; user =" << proxyInfo.user();
-
442 data->authenticator = new QSocks5PasswordAuthenticator(proxyInfo.user(), proxyInfo.password());-
443 }
executed 62 times by 1 test: end of block
Executed by:
  • tst_qsocks5socketengine - unknown status
else {
62
444 if (0) QMessageLogger(__FILE__, 582, __PRETTY_FUNCTION__).debug() << "not using authentication";
dead code: QMessageLogger(__FILE__, 582, __PRETTY_FUNCTION__).debug() << "not using authentication";
-
445 data->authenticator = new QSocks5Authenticator();-
446 }
executed 657 times by 9 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
657
447}-
448-
449void QSocks5SocketEnginePrivate::setErrorState(Socks5State state, const QString &extraMessage)-
450{-
451 QSocks5SocketEngine * const q = q_func();-
452-
453 switch (state) {-
454 case
never executed: case Uninitialized:
Uninitialized:
never executed: case Uninitialized:
0
455 case
never executed: case Authenticating:
Authenticating:
never executed: case Authenticating:
0
456 case
never executed: case AuthenticationMethodsSent:
AuthenticationMethodsSent:
never executed: case AuthenticationMethodsSent:
0
457 case
never executed: case RequestMethodSent:
RequestMethodSent:
never executed: case RequestMethodSent:
0
458 case
never executed: case Connected:
Connected:
never executed: case Connected:
0
459 case
never executed: case UdpAssociateSuccess:
UdpAssociateSuccess:
never executed: case UdpAssociateSuccess:
0
460 case
never executed: case BindSuccess:
BindSuccess:
never executed: case BindSuccess:
0
461-
462 return;
never executed: return;
0
463-
464 case
executed 6 times by 4 tests: case ConnectError:
Executed by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qtcpsocket - unknown status
ConnectError:
executed 6 times by 4 tests: case ConnectError:
Executed by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qtcpsocket - unknown status
6
465 case
executed 37 times by 4 tests: case ControlSocketError:
Executed by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
ControlSocketError:
executed 37 times by 4 tests: case ControlSocketError:
Executed by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
{
37
466 QAbstractSocket::SocketError controlSocketError = data->controlSocket->error();-
467 if (socks5State != Connected
socks5State != ConnectedDescription
TRUEevaluated 43 times by 5 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
) {
0-43
468 switch (controlSocketError) {-
469 case
executed 2 times by 2 tests: case QAbstractSocket::ConnectionRefusedError:
Executed by:
  • tst_QNetworkReply
  • tst_qsocks5socketengine - unknown status
QAbstractSocket::ConnectionRefusedError:
executed 2 times by 2 tests: case QAbstractSocket::ConnectionRefusedError:
Executed by:
  • tst_QNetworkReply
  • tst_qsocks5socketengine - unknown status
2
470 q->setError(QAbstractSocket::ProxyConnectionRefusedError,-
471 QSocks5SocketEngine::tr("Connection to proxy refused"));-
472 break;
executed 2 times by 2 tests: break;
Executed by:
  • tst_QNetworkReply
  • tst_qsocks5socketengine - unknown status
2
473 case
executed 30 times by 1 test: case QAbstractSocket::RemoteHostClosedError:
Executed by:
  • tst_qsocks5socketengine - unknown status
QAbstractSocket::RemoteHostClosedError:
executed 30 times by 1 test: case QAbstractSocket::RemoteHostClosedError:
Executed by:
  • tst_qsocks5socketengine - unknown status
30
474 q->setError(QAbstractSocket::ProxyConnectionClosedError,-
475 QSocks5SocketEngine::tr("Connection to proxy closed prematurely"));-
476 break;
executed 30 times by 1 test: break;
Executed by:
  • tst_qsocks5socketengine - unknown status
30
477 case
executed 4 times by 3 tests: case QAbstractSocket::HostNotFoundError:
Executed by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qtcpsocket - unknown status
QAbstractSocket::HostNotFoundError:
executed 4 times by 3 tests: case QAbstractSocket::HostNotFoundError:
Executed by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qtcpsocket - unknown status
4
478 q->setError(QAbstractSocket::ProxyNotFoundError,-
479 QSocks5SocketEngine::tr("Proxy host not found"));-
480 break;
executed 4 times by 3 tests: break;
Executed by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qtcpsocket - unknown status
4
481 case
executed 7 times by 3 tests: case QAbstractSocket::SocketTimeoutError:
Executed by:
  • tst_QTcpServer
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
QAbstractSocket::SocketTimeoutError:
executed 7 times by 3 tests: case QAbstractSocket::SocketTimeoutError:
Executed by:
  • tst_QTcpServer
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
7
482 if (state == ConnectError
state == ConnectErrorDescription
TRUEnever evaluated
FALSEevaluated 7 times by 3 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
0-7
483 q->setError(QAbstractSocket::ProxyConnectionTimeoutError,-
484 QSocks5SocketEngine::tr("Connection to proxy timed out"));-
485 break;
never executed: break;
0
486 }-
487-
488 default
never executed: default:
code before this statement executed 7 times by 3 tests: default:
Executed by:
  • tst_QTcpServer
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
never executed: default:
:
code before this statement executed 7 times by 3 tests: default:
Executed by:
  • tst_QTcpServer
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
never executed: default:
0-7
489 q->setError(controlSocketError, data->controlSocket->errorString());-
490 break;
executed 7 times by 3 tests: break;
Executed by:
  • tst_QTcpServer
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
7
491 }-
492 } else {-
493 q->setError(controlSocketError, data->controlSocket->errorString());-
494 }
never executed: end of block
0
495 break;
executed 43 times by 5 tests: break;
Executed by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
43
496 }-
497-
498 case
executed 6 times by 2 tests: case AuthenticatingError:
Executed by:
  • tst_QNetworkReply
  • tst_qsocks5socketengine - unknown status
AuthenticatingError:
executed 6 times by 2 tests: case AuthenticatingError:
Executed by:
  • tst_QNetworkReply
  • tst_qsocks5socketengine - unknown status
6
499 q->setError(QAbstractSocket::ProxyAuthenticationRequiredError,-
500 extraMessage.isEmpty() ?-
501 QSocks5SocketEngine::tr("Proxy authentication failed") :-
502 QSocks5SocketEngine::tr("Proxy authentication failed: %1").arg(extraMessage));-
503 break;
executed 6 times by 2 tests: break;
Executed by:
  • tst_QNetworkReply
  • tst_qsocks5socketengine - unknown status
6
504-
505 case
executed 17 times by 3 tests: case RequestError:
Executed by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
RequestError:
executed 17 times by 3 tests: case RequestError:
Executed by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
17
506-
507 break;
executed 17 times by 3 tests: break;
Executed by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
17
508-
509 case
executed 2 times by 1 test: case SocksError:
Executed by:
  • tst_qsocks5socketengine - unknown status
SocksError:
executed 2 times by 1 test: case SocksError:
Executed by:
  • tst_qsocks5socketengine - unknown status
2
510 q->setError(QAbstractSocket::ProxyProtocolError,-
511 QSocks5SocketEngine::tr("SOCKS version 5 protocol error"));-
512 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_qsocks5socketengine - unknown status
2
513-
514 case
executed 4 times by 2 tests: case HostNameLookupError:
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
HostNameLookupError:
executed 4 times by 2 tests: case HostNameLookupError:
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
4
515 q->setError(QAbstractSocket::HostNotFoundError,-
516 QAbstractSocket::tr("Host not found"));-
517 break;
executed 4 times by 2 tests: break;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
4
518 }-
519-
520 q->setState(QAbstractSocket::UnconnectedState);-
521 socks5State = state;-
522}
executed 72 times by 7 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
72
523-
524void QSocks5SocketEnginePrivate::setErrorState(Socks5State state, Socks5Error socks5error)-
525{-
526 QSocks5SocketEngine * const q = q_func();-
527 switch (socks5error) {-
528 case
never executed: case SocksFailure:
SocksFailure:
never executed: case SocksFailure:
0
529 q->setError(QAbstractSocket::NetworkError,-
530 QSocks5SocketEngine::tr("General SOCKSv5 server failure"));-
531 break;
never executed: break;
0
532 case
executed 2 times by 1 test: case ConnectionNotAllowed:
Executed by:
  • tst_qsocks5socketengine - unknown status
ConnectionNotAllowed:
executed 2 times by 1 test: case ConnectionNotAllowed:
Executed by:
  • tst_qsocks5socketengine - unknown status
2
533 q->setError(QAbstractSocket::SocketAccessError,-
534 QSocks5SocketEngine::tr("Connection not allowed by SOCKSv5 server"));-
535 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_qsocks5socketengine - unknown status
2
536 case
executed 2 times by 1 test: case NetworkUnreachable:
Executed by:
  • tst_qsocks5socketengine - unknown status
NetworkUnreachable:
executed 2 times by 1 test: case NetworkUnreachable:
Executed by:
  • tst_qsocks5socketengine - unknown status
2
537 q->setError(QAbstractSocket::NetworkError,-
538 QAbstractSocket::tr("Network unreachable"));-
539 break;
executed 2 times by 1 test: break;
Executed by:
  • tst_qsocks5socketengine - unknown status
2
540 case
executed 8 times by 3 tests: case HostUnreachable:
Executed by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
HostUnreachable:
executed 8 times by 3 tests: case HostUnreachable:
Executed by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
8
541 q->setError(QAbstractSocket::HostNotFoundError,-
542 QAbstractSocket::tr("Host not found"));-
543 break;
executed 8 times by 3 tests: break;
Executed by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
8
544 case
executed 5 times by 2 tests: case ConnectionRefused:
Executed by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
ConnectionRefused:
executed 5 times by 2 tests: case ConnectionRefused:
Executed by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
5
545 q->setError(QAbstractSocket::ConnectionRefusedError,-
546 QAbstractSocket::tr("Connection refused"));-
547 break;
executed 5 times by 2 tests: break;
Executed by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
5
548 case
never executed: case TTLExpired:
TTLExpired:
never executed: case TTLExpired:
0
549 q->setError(QAbstractSocket::NetworkError,-
550 QSocks5SocketEngine::tr("TTL expired"));-
551 break;
never executed: break;
0
552 case
never executed: case CommandNotSupported:
CommandNotSupported:
never executed: case CommandNotSupported:
0
553 q->setError(QAbstractSocket::UnsupportedSocketOperationError,-
554 QSocks5SocketEngine::tr("SOCKSv5 command not supported"));-
555 break;
never executed: break;
0
556 case
never executed: case AddressTypeNotSupported:
AddressTypeNotSupported:
never executed: case AddressTypeNotSupported:
0
557 q->setError(QAbstractSocket::UnsupportedSocketOperationError,-
558 QSocks5SocketEngine::tr("Address type not supported"));-
559 break;
never executed: break;
0
560-
561 default
never executed: default:
:
never executed: default:
0
562 q->setError(QAbstractSocket::UnknownSocketError,-
563 QSocks5SocketEngine::tr("Unknown SOCKSv5 proxy error code 0x%1").arg(int(socks5error), 16));-
564 break;
never executed: break;
0
565 }-
566-
567 setErrorState(state, QString());-
568}
executed 17 times by 3 tests: end of block
Executed by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
17
569-
570void QSocks5SocketEnginePrivate::reauthenticate()-
571{-
572 QSocks5SocketEngine * const q = q_func();-
573-
574-
575 QAuthenticator auth;-
576 q->proxyAuthenticationRequired(proxyInfo, &auth);-
577-
578 if (!auth.user().isEmpty()
!auth.user().isEmpty()Description
TRUEevaluated 85 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qsocks5socketengine - unknown status
|| !auth.password().isEmpty()
!auth.password().isEmpty()Description
TRUEnever evaluated
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qsocks5socketengine - unknown status
) {
0-85
579-
580 if (0) QMessageLogger(__FILE__, 718, __PRETTY_FUNCTION__).debug() << "authentication failure: retrying connection";
dead code: QMessageLogger(__FILE__, 718, __PRETTY_FUNCTION__).debug() << "authentication failure: retrying connection";
-
581 socks5State = QSocks5SocketEnginePrivate::Uninitialized;-
582-
583 delete data->authenticator;-
584 proxyInfo.setUser(auth.user());-
585 proxyInfo.setPassword(auth.password());-
586 data->authenticator = new QSocks5PasswordAuthenticator(proxyInfo.user(), proxyInfo.password());-
587-
588 {-
589 const QSignalBlocker blocker(data->controlSocket);-
590 data->controlSocket->abort();-
591 }-
592 data->controlSocket->connectToHost(proxyInfo.hostName(), proxyInfo.port());-
593 }
executed 85 times by 7 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
else {
85
594-
595-
596 setErrorState(AuthenticatingError);-
597 data->controlSocket->close();-
598 emitConnectionNotification();-
599 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_qsocks5socketengine - unknown status
4
600}-
601-
602void QSocks5SocketEnginePrivate::parseAuthenticationMethodReply()-
603{-
604-
605 if (data->controlSocket->bytesAvailable() < 2
data->controlS...vailable() < 2Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 794 times by 9 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
)
2-794
606 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qsocks5socketengine - unknown status
2
607-
608 QByteArray buf = data->controlSocket->read(2);-
609 if (buf.at(0) != 0x05
buf.at(0) != 0x05Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 793 times by 9 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
1-793
610 if (0) QMessageLogger(__FILE__, 748, __PRETTY_FUNCTION__).debug() << "Socks5 version incorrect";
dead code: QMessageLogger(__FILE__, 748, __PRETTY_FUNCTION__).debug() << "Socks5 version incorrect";
-
611 setErrorState(SocksError);-
612 data->controlSocket->close();-
613 emitConnectionNotification();-
614 return;
executed 1 time by 1 test: return;
Executed by:
  • tst_qsocks5socketengine - unknown status
1
615 }-
616-
617 bool authComplete = false;-
618 if (uchar(buf.at(1)) == 0x00
uchar(buf.at(1)) == 0x00Description
TRUEevaluated 614 times by 8 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
FALSEevaluated 179 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
179-614
619 authComplete = true;-
620 }
executed 614 times by 8 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
else if (uchar(buf.at(1)) == 0xFF
uchar(buf.at(1)) == 0xFFDescription
TRUEevaluated 88 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 91 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
88-614
621 reauthenticate();-
622 return;
executed 88 times by 7 tests: return;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
88
623 } else if (buf.at(1) != data->authenticator->methodId()
buf.at(1) != d...or->methodId()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 89 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
2-89
624 || !data->authenticator->beginAuthenticate(data->controlSocket, &authComplete)
!data->authent...&authComplete)Description
TRUEnever evaluated
FALSEevaluated 89 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
0-89
625 setErrorState(AuthenticatingError, QLatin1String("Socks5 host did not support authentication method."));-
626 socketError = QAbstractSocket::SocketAccessError;-
627 emitConnectionNotification();-
628 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qsocks5socketengine - unknown status
2
629 }-
630-
631 if (authComplete
authCompleteDescription
TRUEevaluated 614 times by 8 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
FALSEevaluated 89 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
)
89-614
632 sendRequestMethod();
executed 614 times by 8 tests: sendRequestMethod();
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
614
633 else-
634 socks5State = Authenticating;
executed 89 times by 7 tests: socks5State = Authenticating;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
89
635}-
636-
637void QSocks5SocketEnginePrivate::parseAuthenticatingReply()-
638{-
639 bool authComplete = false;-
640 if (!data->authenticator->continueAuthenticate(data->controlSocket, &authComplete)
!data->authent...&authComplete)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 89 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
1-89
641 reauthenticate();-
642 return;
executed 1 time by 1 test: return;
Executed by:
  • tst_qsocks5socketengine - unknown status
1
643 }-
644 if (authComplete
authCompleteDescription
TRUEevaluated 87 times by 7 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
)
2-87
645 sendRequestMethod();
executed 87 times by 7 tests: sendRequestMethod();
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
87
646}
executed 89 times by 7 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
89
647-
648void QSocks5SocketEnginePrivate::sendRequestMethod()-
649{-
650 QHostAddress address;-
651 quint16 port = 0;-
652 char command = 0;-
653 if (mode == ConnectMode
mode == ConnectModeDescription
TRUEevaluated 688 times by 9 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 13 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
) {
13-688
654 command = 0x01;-
655 address = peerAddress;-
656 port = peerPort;-
657 }
executed 688 times by 9 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
else if (mode == BindMode
mode == BindModeDescription
TRUEevaluated 11 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
2-688
658 command = 0x02;-
659 address = localAddress;-
660 port = localPort;-
661 }
executed 11 times by 3 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
else {
11
662-
663 command = 0x03;-
664 address = localAddress;-
665 port = localPort;-
666-
667 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qsocks5socketengine - unknown status
2
668-
669 QByteArray buf;-
670 buf.reserve(270);-
671 buf[0] = 0x05;-
672 buf[1] = command;-
673 buf[2] = 0x00;-
674 if (peerName.isEmpty()
peerName.isEmpty()Description
TRUEevaluated 244 times by 4 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
FALSEevaluated 457 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
&& !qt_socks5_set_host_address_and_port(address, port, &buf)
!qt_socks5_set...s, port, &buf)Description
TRUEnever evaluated
FALSEevaluated 244 times by 4 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
) {
0-457
675 if (0) QMessageLogger(__FILE__, 813, __PRETTY_FUNCTION__).debug() << "error setting address" << address << " : " << port;
dead code: QMessageLogger(__FILE__, 813, __PRETTY_FUNCTION__).debug() << "error setting address" << address << " : " << port;
-
676-
677 return;
never executed: return;
0
678 } else if (!peerName.isEmpty()
!peerName.isEmpty()Description
TRUEevaluated 457 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 244 times by 4 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
&& !qt_socks5_set_host_name_and_port(peerName, port, &buf)
!qt_socks5_set...e, port, &buf)Description
TRUEnever evaluated
FALSEevaluated 457 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
0-457
679 if (0) QMessageLogger(__FILE__, 817, __PRETTY_FUNCTION__).debug() << "error setting peer name" << peerName << " : " << port;
dead code: QMessageLogger(__FILE__, 817, __PRETTY_FUNCTION__).debug() << "error setting peer name" << peerName << " : " << port;
-
680-
681 return;
never executed: return;
0
682 }-
683 if (0) QMessageLogger(__FILE__, 821, __PRETTY_FUNCTION__).debug() << "sending" << dump(buf);
dead code: QMessageLogger(__FILE__, 821, __PRETTY_FUNCTION__).debug() << "sending" << dump(buf);
-
684 QByteArray sealedBuf;-
685 if (!data->authenticator->seal(buf, &sealedBuf)
!data->authent...f, &sealedBuf)Description
TRUEnever evaluated
FALSEevaluated 701 times by 9 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
0-701
686-
687 }
never executed: end of block
0
688 data->controlSocket->write(sealedBuf);-
689 data->controlSocket->flush();-
690 socks5State = RequestMethodSent;-
691}
executed 701 times by 9 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
701
692-
693void QSocks5SocketEnginePrivate::parseRequestMethodReply()-
694{-
695 QSocks5SocketEngine * const q = q_func();-
696 if (0) QMessageLogger(__FILE__, 834, __PRETTY_FUNCTION__).debug() << "parseRequestMethodReply()";
dead code: QMessageLogger(__FILE__, 834, __PRETTY_FUNCTION__).debug() << "parseRequestMethodReply()";
-
697-
698 QByteArray inBuf;-
699 if (!data->authenticator->unSeal(data->controlSocket, &inBuf)
!data->authent...ocket, &inBuf)Description
TRUEnever evaluated
FALSEevaluated 727 times by 8 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
) {
0-727
700-
701 if (0) QMessageLogger(__FILE__, 839, __PRETTY_FUNCTION__).debug() << "unSeal failed, needs more data";
dead code: QMessageLogger(__FILE__, 839, __PRETTY_FUNCTION__).debug() << "unSeal failed, needs more data";
-
702 return;
never executed: return;
0
703 }-
704-
705 inBuf.prepend(receivedHeaderFragment);-
706 receivedHeaderFragment.clear();-
707 if (0) QMessageLogger(__FILE__, 845, __PRETTY_FUNCTION__).debug() << dump(inBuf);
dead code: QMessageLogger(__FILE__, 845, __PRETTY_FUNCTION__).debug() << dump(inBuf);
-
708 if (inBuf.size() < 3
inBuf.size() < 3Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 719 times by 8 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
) {
8-719
709 if (0) QMessageLogger(__FILE__, 847, __PRETTY_FUNCTION__).debug() << "need more data for request reply header .. put this data somewhere";
dead code: QMessageLogger(__FILE__, 847, __PRETTY_FUNCTION__).debug() << "need more data for request reply header .. put this data somewhere";
-
710 receivedHeaderFragment = inBuf;-
711 return;
executed 8 times by 1 test: return;
Executed by:
  • tst_qsocks5socketengine - unknown status
8
712 }-
713-
714 QHostAddress address;-
715 quint16 port = 0;-
716-
717 if (inBuf.at(0) != 0x05
inBuf.at(0) != 0x05Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 718 times by 8 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
|| inBuf.at(2) != 0x00
inBuf.at(2) != 0x00Description
TRUEnever evaluated
FALSEevaluated 718 times by 8 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
) {
0-718
718 if (0) QMessageLogger(__FILE__, 856, __PRETTY_FUNCTION__).debug() << "socks protocol error";
dead code: QMessageLogger(__FILE__, 856, __PRETTY_FUNCTION__).debug() << "socks protocol error";
-
719 setErrorState(SocksError);-
720 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_qsocks5socketengine - unknown status
else if (inBuf.at(1) != 0x00
inBuf.at(1) != 0x00Description
TRUEevaluated 21 times by 4 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
FALSEevaluated 697 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
) {
1-697
721 Socks5Error socks5Error = Socks5Error(inBuf.at(1));-
722 if (0) QMessageLogger(__FILE__, 860, __PRETTY_FUNCTION__).debug() << "Request error :" << socks5Error;
dead code: QMessageLogger(__FILE__, 860, __PRETTY_FUNCTION__).debug() << "Request error :" << socks5Error;
-
723 if ((socks5Error == SocksFailure
socks5Error == SocksFailureDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QFtp
FALSEevaluated 19 times by 4 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
|| socks5Error == ConnectionNotAllowed
socks5Error ==...tionNotAllowedDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 15 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
)
2-19
724 && !peerName.isEmpty()
!peerName.isEmpty()Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
2-4
725-
726 setErrorState(HostNameLookupError);-
727 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
else {
4
728 setErrorState(RequestError, socks5Error);-
729 }
executed 17 times by 3 tests: end of block
Executed by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
17
730 } else {-
731-
732 int pos = 3;-
733 int err = qt_socks5_get_host_address_and_port(inBuf, &address, &port, &pos);-
734 if (err == -1
err == -1Description
TRUEnever evaluated
FALSEevaluated 697 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
) {
0-697
735 if (0) QMessageLogger(__FILE__, 873, __PRETTY_FUNCTION__).debug() << "error getting address";
dead code: QMessageLogger(__FILE__, 873, __PRETTY_FUNCTION__).debug() << "error getting address";
-
736 setErrorState(SocksError);-
737 }
never executed: end of block
else if (err == 0
err == 0Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 649 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
) {
0-649
738-
739 receivedHeaderFragment = inBuf;-
740 return;
executed 48 times by 1 test: return;
Executed by:
  • tst_qsocks5socketengine - unknown status
48
741 } else {-
742 inBuf.remove(0, pos);-
743 for (int i = inBuf.size() - 1; i >= 0
i >= 0Description
TRUEnever evaluated
FALSEevaluated 649 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
; --i)
0-649
744 data->controlSocket->ungetChar(inBuf.at(i));
never executed: data->controlSocket->ungetChar(inBuf.at(i));
0
745 }
executed 649 times by 7 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
649
746 }-
747-
748 if (socks5State == RequestMethodSent
socks5State ==...uestMethodSentDescription
TRUEevaluated 647 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 24 times by 5 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
) {
24-647
749-
750 localAddress = address;-
751 localPort = port;-
752-
753 if (mode == ConnectMode
mode == ConnectModeDescription
TRUEevaluated 634 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 13 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
) {
13-634
754 inboundStreamCount = outboundStreamCount = 1;-
755 socks5State = Connected;-
756-
757 q->setState(QAbstractSocket::ConnectedState);-
758 emitConnectionNotification();-
759 }
executed 634 times by 7 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
else if (mode == BindMode
mode == BindModeDescription
TRUEevaluated 11 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
2-634
760 socks5State = BindSuccess;-
761 q->setState(QAbstractSocket::ListeningState);-
762 }
executed 11 times by 3 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
else {
11
763 socks5State = UdpAssociateSuccess;-
764 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qsocks5socketengine - unknown status
2
765 } else if (socks5State == BindSuccess
socks5State == BindSuccessDescription
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 22 times by 4 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
) {
2-22
766-
767 bindData->peerAddress = address;-
768 bindData->peerPort = port;-
769-
770 emitReadNotification();-
771 }
executed 2 times by 2 tests: end of block
Executed by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
else {
2
772-
773 data->controlSocket->close();-
774 emitConnectionNotification();-
775 }
executed 22 times by 4 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
22
776}-
777-
778void QSocks5SocketEnginePrivate::_q_emitPendingReadNotification()-
779{-
780 QSocks5SocketEngine * const q = q_func();-
781 readNotificationPending = false;-
782 if (readNotificationEnabled
readNotificationEnabledDescription
TRUEevaluated 3105 times by 4 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
FALSEnever evaluated
) {
0-3105
783 if (0) QMessageLogger(__FILE__, 921, __PRETTY_FUNCTION__).debug() << "emitting readNotification";
dead code: QMessageLogger(__FILE__, 921, __PRETTY_FUNCTION__).debug() << "emitting readNotification";
-
784 QPointer<QSocks5SocketEngine> qq = q;-
785 q->readNotification();-
786 if (!qq
!qqDescription
TRUEevaluated 356 times by 2 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
FALSEevaluated 2749 times by 4 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
)
356-2749
787 return;
executed 356 times by 2 tests: return;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
356
788-
789 if (data
dataDescription
TRUEevaluated 2745 times by 4 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QFtp
&& data->controlSocket->state() == QAbstractSocket::UnconnectedState
data->controlS...connectedStateDescription
TRUEnever evaluated
FALSEevaluated 2745 times by 4 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
0-2745
790 && data->controlSocket->error() == QAbstractSocket::RemoteHostClosedError
data->controlS...ostClosedErrorDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
791 connectData->readBuffer.clear();-
792 emitReadNotification();-
793 }
never executed: end of block
0
794 }
executed 2749 times by 4 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
2749
795}
executed 2749 times by 4 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
2749
796-
797void QSocks5SocketEnginePrivate::emitReadNotification()-
798{-
799 QSocks5SocketEngine * const q = q_func();-
800 readNotificationActivated = true;-
801 if (readNotificationEnabled
readNotificationEnabledDescription
TRUEevaluated 3282 times by 5 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsslsocket - unknown status
FALSEevaluated 24 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
&& !readNotificationPending
!readNotificationPendingDescription
TRUEevaluated 3193 times by 5 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsslsocket - unknown status
FALSEevaluated 89 times by 2 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsslsocket - unknown status
) {
24-3282
802 if (0) QMessageLogger(__FILE__, 940, __PRETTY_FUNCTION__).debug() << "queueing readNotification";
dead code: QMessageLogger(__FILE__, 940, __PRETTY_FUNCTION__).debug() << "queueing readNotification";
-
803 readNotificationPending = true;-
804 QMetaObject::invokeMethod(q, "_q_emitPendingReadNotification", Qt::QueuedConnection);-
805 }
executed 3193 times by 5 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsslsocket - unknown status
3193
806}
executed 3306 times by 6 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
3306
807-
808void QSocks5SocketEnginePrivate::_q_emitPendingWriteNotification()-
809{-
810 writeNotificationPending = false;-
811 QSocks5SocketEngine * const q = q_func();-
812 if (writeNotificationEnabled
writeNotificationEnabledDescription
TRUEevaluated 2135 times by 4 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
FALSEevaluated 1616 times by 4 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
) {
1616-2135
813 if (0) QMessageLogger(__FILE__, 951, __PRETTY_FUNCTION__).debug() << "emitting writeNotification";
dead code: QMessageLogger(__FILE__, 951, __PRETTY_FUNCTION__).debug() << "emitting writeNotification";
-
814 q->writeNotification();-
815 }
executed 2135 times by 4 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
2135
816}
executed 3751 times by 4 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
3751
817-
818void QSocks5SocketEnginePrivate::emitWriteNotification()-
819{-
820 QSocks5SocketEngine * const q = q_func();-
821 writeNotificationActivated = true;-
822 if (writeNotificationEnabled
writeNotificationEnabledDescription
TRUEevaluated 4402 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 357 times by 2 tests
Evaluated by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
&& !writeNotificationPending
!writeNotificationPendingDescription
TRUEevaluated 3883 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 519 times by 5 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsslsocket - unknown status
) {
357-4402
823 if (0) QMessageLogger(__FILE__, 961, __PRETTY_FUNCTION__).debug() << "queueing writeNotification";
dead code: QMessageLogger(__FILE__, 961, __PRETTY_FUNCTION__).debug() << "queueing writeNotification";
-
824 writeNotificationPending = true;-
825 QMetaObject::invokeMethod(q, "_q_emitPendingWriteNotification", Qt::QueuedConnection);-
826 }
executed 3883 times by 7 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
3883
827}
executed 4759 times by 7 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
4759
828-
829void QSocks5SocketEnginePrivate::_q_emitPendingConnectionNotification()-
830{-
831 connectionNotificationPending = false;-
832 QSocks5SocketEngine * const q = q_func();-
833 if (0) QMessageLogger(__FILE__, 971, __PRETTY_FUNCTION__).debug() << "emitting connectionNotification";
dead code: QMessageLogger(__FILE__, 971, __PRETTY_FUNCTION__).debug() << "emitting connectionNotification";
-
834 q->connectionNotification();-
835}
executed 598 times by 5 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
598
836-
837void QSocks5SocketEnginePrivate::emitConnectionNotification()-
838{-
839 QSocks5SocketEngine * const q = q_func();-
840 if (0) QMessageLogger(__FILE__, 978, __PRETTY_FUNCTION__).debug() << "queueing connectionNotification";
dead code: QMessageLogger(__FILE__, 978, __PRETTY_FUNCTION__).debug() << "queueing connectionNotification";
-
841 connectionNotificationPending = true;-
842 QMetaObject::invokeMethod(q, "_q_emitPendingConnectionNotification", Qt::QueuedConnection);-
843}
executed 699 times by 8 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
699
844-
845QSocks5SocketEngine::QSocks5SocketEngine(QObject *parent)-
846:QAbstractSocketEngine(*new QSocks5SocketEnginePrivate(), parent)-
847{-
848}
executed 726 times by 9 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
726
849-
850QSocks5SocketEngine::~QSocks5SocketEngine()-
851{-
852 QSocks5SocketEnginePrivate * const d = d_func();-
853-
854 if (d->data
d->dataDescription
TRUEevaluated 719 times by 9 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 7 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
) {
7-719
855 delete d->data->authenticator;-
856 delete d->data->controlSocket;-
857 }
executed 719 times by 9 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
719
858 if (d->connectData
d->connectDataDescription
TRUEevaluated 710 times by 9 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 16 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
)
16-710
859 delete d->connectData;
executed 710 times by 9 tests: delete d->connectData;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
710
860-
861 if (d->udpData
d->udpDataDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 724 times by 9 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
2-724
862 delete d->udpData->udpSocket;-
863 delete d->udpData;-
864 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qsocks5socketengine - unknown status
2
865-
866 if (d->bindData
d->bindDataDescription
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tst_QTcpServer
FALSEevaluated 719 times by 9 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
)
7-719
867 delete d->bindData;
executed 7 times by 1 test: delete d->bindData;
Executed by:
  • tst_QTcpServer
7
868}
executed 726 times by 9 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
726
869-
870static QBasicAtomicInt descriptorCounter = { 1 };-
871-
872bool QSocks5SocketEngine::initialize(QAbstractSocket::SocketType type, QAbstractSocket::NetworkLayerProtocol protocol)-
873{-
874 QSocks5SocketEnginePrivate * const d = d_func();-
875-
876 d->socketDescriptor = descriptorCounter.fetchAndAddRelaxed(1);-
877-
878 d->socketType = type;-
879 d->socketProtocol = protocol;-
880-
881 return
executed 720 times by 9 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
true;
executed 720 times by 9 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
720
882}-
883-
884bool QSocks5SocketEngine::initialize(qintptr socketDescriptor, QAbstractSocket::SocketState socketState)-
885{-
886 QSocks5SocketEnginePrivate * const d = d_func();-
887-
888 if (0) QMessageLogger(__FILE__, 1026, __PRETTY_FUNCTION__).debug() << "initialize" << socketDescriptor;
dead code: QMessageLogger(__FILE__, 1026, __PRETTY_FUNCTION__).debug() << "initialize" << socketDescriptor;
-
889-
890-
891-
892 if (socketState != QAbstractSocket::ConnectedState
socketState !=...ConnectedStateDescription
TRUEnever evaluated
FALSEevaluated 6 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
) {
0-6
893-
894 return
never executed: return false;
false;
never executed: return false;
0
895 }-
896-
897 QSocks5BindData *bindData = socks5BindStore()->retrieve(socketDescriptor);-
898 if (bindData
bindDataDescription
TRUEevaluated 6 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
FALSEnever evaluated
) {
0-6
899-
900 d->socketState = QAbstractSocket::ConnectedState;-
901 d->socketType = QAbstractSocket::TcpSocket;-
902 d->connectData = new QSocks5ConnectData;-
903 d->data = d->connectData;-
904 d->mode = QSocks5SocketEnginePrivate::ConnectMode;-
905 d->data->controlSocket = bindData->controlSocket;-
906 bindData->controlSocket = 0;-
907 d->data->controlSocket->setParent(this);-
908 d->socketProtocol = d->data->controlSocket->localAddress().protocol();-
909 d->data->authenticator = bindData->authenticator;-
910 bindData->authenticator = 0;-
911 d->localPort = bindData->localPort;-
912 d->localAddress = bindData->localAddress;-
913 d->peerPort = bindData->peerPort;-
914 d->peerAddress = bindData->peerAddress;-
915 d->inboundStreamCount = d->outboundStreamCount = 1;-
916 delete bindData;-
917-
918 QObject::connect(d->data->controlSocket, qFlagLocation("2""connected()" "\0" __FILE__ ":" "1056"), this, qFlagLocation("1""_q_controlSocketConnected()" "\0" __FILE__ ":" "1056"),-
919 Qt::DirectConnection);-
920 QObject::connect(d->data->controlSocket, qFlagLocation("2""readyRead()" "\0" __FILE__ ":" "1058"), this, qFlagLocation("1""_q_controlSocketReadNotification()" "\0" __FILE__ ":" "1058"),-
921 Qt::DirectConnection);-
922 QObject::connect(d->data->controlSocket, qFlagLocation("2""bytesWritten(qint64)" "\0" __FILE__ ":" "1060"), this, qFlagLocation("1""_q_controlSocketBytesWritten()" "\0" __FILE__ ":" "1060"),-
923 Qt::DirectConnection);-
924 QObject::connect(d->data->controlSocket, qFlagLocation("2""error(QAbstractSocket::SocketError)" "\0" __FILE__ ":" "1062"), this, qFlagLocation("1""_q_controlSocketError(QAbstractSocket::SocketError)" "\0" __FILE__ ":" "1062"),-
925 Qt::DirectConnection);-
926 QObject::connect(d->data->controlSocket, qFlagLocation("2""disconnected()" "\0" __FILE__ ":" "1064"), this, qFlagLocation("1""_q_controlSocketDisconnected()" "\0" __FILE__ ":" "1064"),-
927 Qt::DirectConnection);-
928 QObject::connect(d->data->controlSocket, qFlagLocation("2""stateChanged(QAbstractSocket::SocketState)" "\0" __FILE__ ":" "1066"),-
929 this, qFlagLocation("1""_q_controlSocketStateChanged(QAbstractSocket::SocketState)" "\0" __FILE__ ":" "1067"),-
930 Qt::DirectConnection);-
931-
932 d->socks5State = QSocks5SocketEnginePrivate::Connected;-
933-
934 if (d->data->controlSocket->bytesAvailable() != 0
d->data->contr...ailable() != 0Description
TRUEnever evaluated
FALSEevaluated 6 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
)
0-6
935 d->_q_controlSocketReadNotification();
never executed: d->_q_controlSocketReadNotification();
0
936 return
executed 6 times by 3 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
true;
executed 6 times by 3 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
6
937 }-
938 return
never executed: return false;
false;
never executed: return false;
0
939}-
940-
941void QSocks5SocketEngine::setProxy(const QNetworkProxy &networkProxy)-
942{-
943 QSocks5SocketEnginePrivate * const d = d_func();-
944 d->proxyInfo = networkProxy;-
945}
executed 719 times by 9 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
719
946-
947qintptr QSocks5SocketEngine::socketDescriptor() const-
948{-
949 const QSocks5SocketEnginePrivate * const d = d_func();-
950 return
executed 1090 times by 9 tests: return d->socketDescriptor;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
d->socketDescriptor;
executed 1090 times by 9 tests: return d->socketDescriptor;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
1090
951}-
952-
953bool QSocks5SocketEngine::isValid() const-
954{-
955 const QSocks5SocketEnginePrivate * const d = d_func();-
956 return
executed 9767 times by 6 tests: return d->socketType != QAbstractSocket::UnknownSocketType && d->socks5State != QSocks5SocketEnginePrivate::SocksError && (d->socketError == QAbstractSocket::UnknownSocketError || d->socketError == QAbstractSocket::SocketTimeoutError || d->socketError == QAbstractSocket::UnfinishedSocketOperationError);
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
d->socketType != QAbstractSocket::UnknownSocketType
executed 9767 times by 6 tests: return d->socketType != QAbstractSocket::UnknownSocketType && d->socks5State != QSocks5SocketEnginePrivate::SocksError && (d->socketError == QAbstractSocket::UnknownSocketError || d->socketError == QAbstractSocket::SocketTimeoutError || d->socketError == QAbstractSocket::UnfinishedSocketOperationError);
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
9767
957 && d->socks5State != QSocks5SocketEnginePrivate::SocksError
executed 9767 times by 6 tests: return d->socketType != QAbstractSocket::UnknownSocketType && d->socks5State != QSocks5SocketEnginePrivate::SocksError && (d->socketError == QAbstractSocket::UnknownSocketError || d->socketError == QAbstractSocket::SocketTimeoutError || d->socketError == QAbstractSocket::UnfinishedSocketOperationError);
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
9767
958 && (d->socketError == QAbstractSocket::UnknownSocketError
executed 9767 times by 6 tests: return d->socketType != QAbstractSocket::UnknownSocketType && d->socks5State != QSocks5SocketEnginePrivate::SocksError && (d->socketError == QAbstractSocket::UnknownSocketError || d->socketError == QAbstractSocket::SocketTimeoutError || d->socketError == QAbstractSocket::UnfinishedSocketOperationError);
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
9767
959 || d->socketError == QAbstractSocket::SocketTimeoutError
executed 9767 times by 6 tests: return d->socketType != QAbstractSocket::UnknownSocketType && d->socks5State != QSocks5SocketEnginePrivate::SocksError && (d->socketError == QAbstractSocket::UnknownSocketError || d->socketError == QAbstractSocket::SocketTimeoutError || d->socketError == QAbstractSocket::UnfinishedSocketOperationError);
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
9767
960 || d->socketError == QAbstractSocket::UnfinishedSocketOperationError);
executed 9767 times by 6 tests: return d->socketType != QAbstractSocket::UnknownSocketType && d->socks5State != QSocks5SocketEnginePrivate::SocksError && (d->socketError == QAbstractSocket::UnknownSocketError || d->socketError == QAbstractSocket::SocketTimeoutError || d->socketError == QAbstractSocket::UnfinishedSocketOperationError);
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
9767
961}-
962-
963bool QSocks5SocketEngine::connectInternal()-
964{-
965 QSocks5SocketEnginePrivate * const d = d_func();-
966-
967 if (!d->data
!d->dataDescription
TRUEevaluated 705 times by 9 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qsocks5socketengine - unknown status
) {
4-705
968 if (socketType() == QAbstractSocket::TcpSocket
socketType() =...ket::TcpSocketDescription
TRUEevaluated 704 times by 9 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
1-704
969 d->initialize(QSocks5SocketEnginePrivate::ConnectMode);-
970-
971 }
executed 704 times by 9 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
else if (socketType() == QAbstractSocket::UdpSocket
socketType() =...ket::UdpSocketDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEnever evaluated
) {
0-704
972 d->initialize(QSocks5SocketEnginePrivate::UdpAssociateMode);-
973-
974 if (!bind(QHostAddress(QLatin1String("0.0.0.0")), 0)
!bind(QHostAdd...0.0.0.0")), 0)Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
)
0-1
975 return
never executed: return false;
false;
never executed: return false;
0
976-
977 setState(QAbstractSocket::ConnectedState);-
978 return
executed 1 time by 1 test: return true;
Executed by:
  • tst_qsocks5socketengine - unknown status
true;
executed 1 time by 1 test: return true;
Executed by:
  • tst_qsocks5socketengine - unknown status
1
979-
980 } else {-
981 QMessageLogger(__FILE__, 1119, __PRETTY_FUNCTION__).fatal("QSocks5SocketEngine::connectToHost: in QTcpServer mode");-
982 return
never executed: return false;
false;
never executed: return false;
0
983 }-
984 }-
985-
986 if (d->socketState != QAbstractSocket::ConnectingState
d->socketState...onnectingStateDescription
TRUEevaluated 708 times by 9 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
) {
0-708
987 if (d->socks5State == QSocks5SocketEnginePrivate::Uninitialized
d->socks5State...:UninitializedDescription
TRUEevaluated 704 times by 9 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qsocks5socketengine - unknown status
4-704
988-
989 || d->socks5State == QSocks5SocketEnginePrivate::AuthenticatingError
d->socks5State...nticatingErrorDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QNetworkReply
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
2
990 setState(QAbstractSocket::ConnectingState);-
991-
992 d->data->controlSocket->setReadBufferSize(65536);-
993 }
executed 706 times by 9 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
706
994-
995 d->data->controlSocket->connectToHost(d->proxyInfo.hostName(), d->proxyInfo.port());-
996 }
executed 708 times by 9 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
708
997-
998 return
executed 708 times by 9 tests: return false;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
false;
executed 708 times by 9 tests: return false;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
708
999}-
1000-
1001bool QSocks5SocketEngine::connectToHost(const QHostAddress &address, quint16 port)-
1002{-
1003 QSocks5SocketEnginePrivate * const d = d_func();-
1004 if (0) QMessageLogger(__FILE__, 1142, __PRETTY_FUNCTION__).debug() << "connectToHost" << address << ':' << port;
dead code: QMessageLogger(__FILE__, 1142, __PRETTY_FUNCTION__).debug() << "connectToHost" << address << ':' << port;
-
1005-
1006 setPeerAddress(address);-
1007 setPeerPort(port);-
1008 d->peerName.clear();-
1009-
1010 return
executed 249 times by 5 tests: return connectInternal();
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
connectInternal();
executed 249 times by 5 tests: return connectInternal();
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
249
1011}-
1012-
1013bool QSocks5SocketEngine::connectToHostByName(const QString &hostname, quint16 port)-
1014{-
1015 QSocks5SocketEnginePrivate * const d = d_func();-
1016-
1017 setPeerAddress(QHostAddress());-
1018 setPeerPort(port);-
1019 d->peerName = hostname;-
1020-
1021 return
executed 460 times by 7 tests: return connectInternal();
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
connectInternal();
executed 460 times by 7 tests: return connectInternal();
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
460
1022}-
1023-
1024void QSocks5SocketEnginePrivate::_q_controlSocketConnected()-
1025{-
1026 if (0) QMessageLogger(__FILE__, 1164, __PRETTY_FUNCTION__).debug() << "_q_controlSocketConnected";
dead code: QMessageLogger(__FILE__, 1164, __PRETTY_FUNCTION__).debug() << "_q_controlSocketConnected";
-
1027 QByteArray buf(3, 0);-
1028 buf[0] = 0x05;-
1029 buf[1] = 0x01;-
1030 buf[2] = data->authenticator->methodId();-
1031 data->controlSocket->write(buf);-
1032 socks5State = AuthenticationMethodsSent;-
1033}
executed 798 times by 9 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
798
1034-
1035void QSocks5SocketEnginePrivate::_q_controlSocketReadNotification()-
1036{-
1037 if (0) QMessageLogger(__FILE__, 1175, __PRETTY_FUNCTION__).debug() << "_q_controlSocketReadNotification socks5state" << s5StateToString(socks5State)
dead code: QMessageLogger(__FILE__, 1175, __PRETTY_FUNCTION__).debug() << "_q_controlSocketReadNotification socks5state" << s5StateToString(socks5State) << "bytes available" << data->controlSocket->bytesAvailable();
-
1038 << "bytes available" << data->controlSocket->bytesAvailable();
dead code: QMessageLogger(__FILE__, 1175, __PRETTY_FUNCTION__).debug() << "_q_controlSocketReadNotification socks5state" << s5StateToString(socks5State) << "bytes available" << data->controlSocket->bytesAvailable();
-
1039-
1040 if (data->controlSocket->bytesAvailable() == 0
data->controlS...ailable() == 0Description
TRUEnever evaluated
FALSEevaluated 4541 times by 9 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
0-4541
1041 if (0) QMessageLogger(__FILE__, 1179, __PRETTY_FUNCTION__).debug() << "########## bogus read why do we get these ... on windows only";
dead code: QMessageLogger(__FILE__, 1179, __PRETTY_FUNCTION__).debug() << "########## bogus read why do we get these ... on windows only";
-
1042 return;
never executed: return;
0
1043 }-
1044-
1045 switch (socks5State) {-
1046 case
executed 796 times by 9 tests: case AuthenticationMethodsSent:
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
AuthenticationMethodsSent:
executed 796 times by 9 tests: case AuthenticationMethodsSent:
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
796
1047 parseAuthenticationMethodReply();-
1048 break;
executed 796 times by 9 tests: break;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
796
1049 case
executed 90 times by 7 tests: case Authenticating:
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
Authenticating:
executed 90 times by 7 tests: case Authenticating:
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
90
1050 parseAuthenticatingReply();-
1051 break;
executed 90 times by 7 tests: break;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
90
1052 case
executed 725 times by 8 tests: case RequestMethodSent:
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
RequestMethodSent:
executed 725 times by 8 tests: case RequestMethodSent:
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
725
1053 parseRequestMethodReply();-
1054 break;
executed 725 times by 8 tests: break;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
725
1055 case
executed 2928 times by 6 tests: case Connected:
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
Connected:
executed 2928 times by 6 tests: case Connected:
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
{
2928
1056 QByteArray buf;-
1057 if (!data->authenticator->unSeal(data->controlSocket, &buf)
!data->authent...lSocket, &buf)Description
TRUEnever evaluated
FALSEevaluated 2928 times by 6 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
) {
0-2928
1058-
1059 }
never executed: end of block
0
1060 if (buf.size()
buf.size()Description
TRUEevaluated 2928 times by 6 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
FALSEnever evaluated
) {
0-2928
1061 if (0) QMessageLogger(__FILE__, 1199, __PRETTY_FUNCTION__).debug() << dump(buf);
dead code: QMessageLogger(__FILE__, 1199, __PRETTY_FUNCTION__).debug() << dump(buf);
-
1062 connectData->readBuffer += buf;-
1063 emitReadNotification();-
1064 }
executed 2928 times by 6 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
2928
1065 break;
executed 2928 times by 6 tests: break;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
2928
1066 }-
1067 case
executed 2 times by 2 tests: case BindSuccess:
Executed by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
BindSuccess:
executed 2 times by 2 tests: case BindSuccess:
Executed by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
2
1068-
1069 if (mode == BindMode
mode == BindModeDescription
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
FALSEnever evaluated
) {
0-2
1070 parseRequestMethodReply();-
1071 break;
executed 2 times by 2 tests: break;
Executed by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
2
1072 }-
1073-
1074-
1075 default
never executed: default:
:
never executed: default:
code before this statement never executed: default:
0
1076 QMessageLogger(__FILE__, 1214, __PRETTY_FUNCTION__).warning("QSocks5SocketEnginePrivate::_q_controlSocketReadNotification: "-
1077 "Unexpectedly received data while in state=%d and mode=%d",-
1078 socks5State, mode);-
1079 break;
never executed: break;
0
1080 };-
1081}-
1082-
1083void QSocks5SocketEnginePrivate::_q_controlSocketBytesWritten()-
1084{-
1085 if (0) QMessageLogger(__FILE__, 1223, __PRETTY_FUNCTION__).debug() << "_q_controlSocketBytesWritten";
dead code: QMessageLogger(__FILE__, 1223, __PRETTY_FUNCTION__).debug() << "_q_controlSocketBytesWritten";
-
1086-
1087 if (socks5State != Connected
socks5State != ConnectedDescription
TRUEevaluated 1588 times by 9 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 1886 times by 6 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
1588-1886
1088 || (mode == ConnectMode
mode == ConnectModeDescription
TRUEevaluated 1886 times by 6 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
FALSEnever evaluated
0-1886
1089 && data->controlSocket->bytesToWrite()
data->controlS...bytesToWrite()Description
TRUEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qsslsocket - unknown status
FALSEevaluated 1883 times by 6 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
))
3-1883
1090 return;
executed 1591 times by 9 tests: return;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
1591
1091 if (data->controlSocket->bytesToWrite() < MaxWriteBufferSize
data->controlS...riteBufferSizeDescription
TRUEevaluated 1883 times by 6 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
FALSEnever evaluated
) {
0-1883
1092 emitWriteNotification();-
1093 writeNotificationActivated = false;-
1094 }
executed 1883 times by 6 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
1883
1095}
executed 1883 times by 6 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
1883
1096-
1097void QSocks5SocketEnginePrivate::_q_controlSocketError(QAbstractSocket::SocketError error)-
1098{-
1099 if (0) QMessageLogger(__FILE__, 1237, __PRETTY_FUNCTION__).debug() << "controlSocketError" << error << data->controlSocket->errorString();
dead code: QMessageLogger(__FILE__, 1237, __PRETTY_FUNCTION__).debug() << "controlSocketError" << error << data->controlSocket->errorString();
-
1100-
1101 if (error == QAbstractSocket::SocketTimeoutError
error == QAbst...etTimeoutErrorDescription
TRUEevaluated 33 times by 5 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 391 times by 6 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
)
33-391
1102 return;
executed 33 times by 5 tests: return;
Executed by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
33
1103-
1104 if (error == QAbstractSocket::RemoteHostClosedError
error == QAbst...ostClosedErrorDescription
TRUEevaluated 383 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
FALSEevaluated 8 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qtcpsocket - unknown status
8-383
1105 && socks5State == Connected
socks5State == ConnectedDescription
TRUEevaluated 353 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
30-353
1106-
1107-
1108 if (!readNotificationPending
!readNotificationPendingDescription
TRUEevaluated 351 times by 2 tests
Evaluated by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsslsocket - unknown status
)
2-351
1109 connectData->readBuffer.clear();
executed 351 times by 2 tests: connectData->readBuffer.clear();
Executed by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
351
1110 emitReadNotification();-
1111 data->controlSocket->close();-
1112-
1113 emitWriteNotification();-
1114 }
executed 353 times by 3 tests: end of block
Executed by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
else if (socks5State == Uninitialized
socks5State == UninitializedDescription
TRUEevaluated 6 times by 4 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 32 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
6-353
1115 || socks5State == AuthenticationMethodsSent
socks5State ==...ionMethodsSentDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 31 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
1-31
1116 || socks5State == Authenticating
socks5State == AuthenticatingDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 30 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
1-30
1117 || socks5State == RequestMethodSent
socks5State ==...uestMethodSentDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
2-28
1118 setErrorState(socks5State == Uninitialized ? ConnectError : ControlSocketError);-
1119 data->controlSocket->close();-
1120 emitConnectionNotification();-
1121 }
executed 36 times by 4 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qtcpsocket - unknown status
else {
36
1122 q_func()->setError(data->controlSocket->error(), data->controlSocket->errorString());-
1123 emitReadNotification();-
1124 emitWriteNotification();-
1125 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qsocks5socketengine - unknown status
2
1126}-
1127-
1128void QSocks5SocketEnginePrivate::_q_controlSocketDisconnected()-
1129{-
1130 if (0) QMessageLogger(__FILE__, 1268, __PRETTY_FUNCTION__).debug() << "_q_controlSocketDisconnected";
dead code: QMessageLogger(__FILE__, 1268, __PRETTY_FUNCTION__).debug() << "_q_controlSocketDisconnected";
-
1131}
executed 713 times by 9 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
713
1132-
1133void QSocks5SocketEnginePrivate::_q_controlSocketStateChanged(QAbstractSocket::SocketState state)-
1134{-
1135 if (0) QMessageLogger(__FILE__, 1273, __PRETTY_FUNCTION__).debug() << "_q_controlSocketStateChanged" << state;
dead code: QMessageLogger(__FILE__, 1273, __PRETTY_FUNCTION__).debug() << "_q_controlSocketStateChanged" << state;
-
1136}
executed 3835 times by 9 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
3835
1137-
1138-
1139void QSocks5SocketEnginePrivate::checkForDatagrams() const-
1140{-
1141-
1142 if (udpData->udpSocket->hasPendingDatagrams()
udpData->udpSo...ingDatagrams()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1143 const_cast<
never executed: const_cast<QSocks5SocketEnginePrivate *>(this)->_q_udpSocketReadNotification();
QSocks5SocketEnginePrivate *>(this)->_q_udpSocketReadNotification();
never executed: const_cast<QSocks5SocketEnginePrivate *>(this)->_q_udpSocketReadNotification();
0
1144}
never executed: end of block
0
1145-
1146void QSocks5SocketEnginePrivate::_q_udpSocketReadNotification()-
1147{-
1148 if (0) QMessageLogger(__FILE__, 1286, __PRETTY_FUNCTION__).debug() << "_q_udpSocketReadNotification()";
dead code: QMessageLogger(__FILE__, 1286, __PRETTY_FUNCTION__).debug() << "_q_udpSocketReadNotification()";
-
1149-
1150-
1151 if (!udpData->udpSocket->hasPendingDatagrams()
!udpData->udpS...ingDatagrams()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1152 if (0) QMessageLogger(__FILE__, 1290, __PRETTY_FUNCTION__).debug() << "false read ??";
dead code: QMessageLogger(__FILE__, 1290, __PRETTY_FUNCTION__).debug() << "false read ??";
-
1153 return;
never executed: return;
0
1154 }-
1155-
1156 while (udpData->udpSocket->hasPendingDatagrams()
udpData->udpSo...ingDatagrams()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1157 QByteArray sealedBuf(udpData->udpSocket->pendingDatagramSize(), 0);-
1158 if (0) QMessageLogger(__FILE__, 1296, __PRETTY_FUNCTION__).debug() << "new datagram";
dead code: QMessageLogger(__FILE__, 1296, __PRETTY_FUNCTION__).debug() << "new datagram";
-
1159 udpData->udpSocket->readDatagram(sealedBuf.data(), sealedBuf.size());-
1160 QByteArray inBuf;-
1161 if (!data->authenticator->unSeal(sealedBuf, &inBuf)
!data->authent...edBuf, &inBuf)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1162 if (0) QMessageLogger(__FILE__, 1300, __PRETTY_FUNCTION__).debug() << "failed unsealing datagram discarding";
dead code: QMessageLogger(__FILE__, 1300, __PRETTY_FUNCTION__).debug() << "failed unsealing datagram discarding";
-
1163 return;
never executed: return;
0
1164 }-
1165 if (0) QMessageLogger(__FILE__, 1303, __PRETTY_FUNCTION__).debug() << dump(inBuf);
dead code: QMessageLogger(__FILE__, 1303, __PRETTY_FUNCTION__).debug() << dump(inBuf);
-
1166 int pos = 0;-
1167 const char *buf = inBuf.constData();-
1168 if (inBuf.size() < 4
inBuf.size() < 4Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1169 if (0) QMessageLogger(__FILE__, 1307, __PRETTY_FUNCTION__).debug() << "bugus udp data, discarding";
dead code: QMessageLogger(__FILE__, 1307, __PRETTY_FUNCTION__).debug() << "bugus udp data, discarding";
-
1170 return;
never executed: return;
0
1171 }-
1172 QSocks5RevivedDatagram datagram;-
1173 if (buf[pos++] != 0
buf[pos++] != 0Description
TRUEnever evaluated
FALSEnever evaluated
|| buf[pos++] != 0
buf[pos++] != 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1174 if (0) QMessageLogger(__FILE__, 1312, __PRETTY_FUNCTION__).debug() << "invalid datagram discarding";
dead code: QMessageLogger(__FILE__, 1312, __PRETTY_FUNCTION__).debug() << "invalid datagram discarding";
-
1175 return;
never executed: return;
0
1176 }-
1177 if (buf[pos++] != 0
buf[pos++] != 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1178 if (0) QMessageLogger(__FILE__, 1316, __PRETTY_FUNCTION__).debug() << "don't support fragmentation yet disgarding";
dead code: QMessageLogger(__FILE__, 1316, __PRETTY_FUNCTION__).debug() << "don't support fragmentation yet disgarding";
-
1179 return;
never executed: return;
0
1180 }-
1181 if (qt_socks5_get_host_address_and_port(inBuf, &datagram.address, &datagram.port, &pos) != 1
qt_socks5_get_...rt, &pos) != 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1182 if (0) QMessageLogger(__FILE__, 1320, __PRETTY_FUNCTION__).debug() << "failed to get address from datagram disgarding";
dead code: QMessageLogger(__FILE__, 1320, __PRETTY_FUNCTION__).debug() << "failed to get address from datagram disgarding";
-
1183 return;
never executed: return;
0
1184 }-
1185 datagram.data = QByteArray(&buf[pos], inBuf.size() - pos);-
1186 udpData->pendingDatagrams.enqueue(datagram);-
1187 }
never executed: end of block
0
1188 emitReadNotification();-
1189}
never executed: end of block
0
1190-
1191-
1192bool QSocks5SocketEngine::bind(const QHostAddress &addr, quint16 port)-
1193{-
1194 QSocks5SocketEnginePrivate * const d = d_func();-
1195-
1196-
1197-
1198 QHostAddress address;-
1199 if (addr.protocol() == QAbstractSocket::AnyIPProtocol
addr.protocol(...:AnyIPProtocolDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_QTcpServer
FALSEevaluated 7 times by 2 tests
Evaluated by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
)
7-8
1200 address = QHostAddress::AnyIPv4;
executed 8 times by 1 test: address = QHostAddress::AnyIPv4;
Executed by:
  • tst_QTcpServer
8
1201 else-
1202 address = addr;
executed 7 times by 2 tests: address = addr;
Executed by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
7
1203-
1204 if (!d->data
!d->dataDescription
TRUEevaluated 14 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
1-14
1205 if (socketType() == QAbstractSocket::TcpSocket
socketType() =...ket::TcpSocketDescription
TRUEevaluated 13 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
1-13
1206 d->initialize(QSocks5SocketEnginePrivate::BindMode);-
1207-
1208 }
executed 13 times by 3 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
else if (socketType() == QAbstractSocket::UdpSocket
socketType() =...ket::UdpSocketDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEnever evaluated
) {
0-13
1209 d->initialize(QSocks5SocketEnginePrivate::UdpAssociateMode);-
1210-
1211 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_qsocks5socketengine - unknown status
else {
1
1212-
1213 return
never executed: return false;
false;
never executed: return false;
0
1214 }-
1215 }-
1216-
1217-
1218 if (d->mode == QSocks5SocketEnginePrivate::UdpAssociateMode
d->mode == QSo...pAssociateModeDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 13 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
) {
2-13
1219 if (!d->udpData->udpSocket->bind(address, port)
!d->udpData->u...address, port)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
0-2
1220 if (0) QMessageLogger(__FILE__, 1358, __PRETTY_FUNCTION__).debug() << "local udp bind failed";
dead code: QMessageLogger(__FILE__, 1358, __PRETTY_FUNCTION__).debug() << "local udp bind failed";
-
1221 setError(d->udpData->udpSocket->error(), d->udpData->udpSocket->errorString());-
1222 return
never executed: return false;
false;
never executed: return false;
0
1223 }-
1224 d->localAddress = d->udpData->udpSocket->localAddress();-
1225 d->localPort = d->udpData->udpSocket->localPort();-
1226 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qsocks5socketengine - unknown status
else
2
1227-
1228 if (d->mode == QSocks5SocketEnginePrivate::BindMode
d->mode == QSo...vate::BindModeDescription
TRUEevaluated 13 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
FALSEnever evaluated
) {
0-13
1229 d->localAddress = address;-
1230 d->localPort = port;-
1231 }
executed 13 times by 3 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
else {
13
1232-
1233 return
never executed: return false;
false;
never executed: return false;
0
1234 }-
1235-
1236 int msecs = 5000;-
1237 QElapsedTimer stopWatch;-
1238 stopWatch.start();-
1239 d->data->controlSocket->connectToHost(d->proxyInfo.hostName(), d->proxyInfo.port());-
1240 if (!d->waitForConnected(msecs, 0)
!d->waitForConnected(msecs, 0)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTcpServer
FALSEevaluated 14 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
||
1-14
1241 d->data->controlSocket->state() == QAbstractSocket::UnconnectedState
d->data->contr...connectedStateDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTcpServer
FALSEevaluated 13 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
) {
1-13
1242-
1243 if (0) QMessageLogger(__FILE__, 1381, __PRETTY_FUNCTION__).debug() << "waitForConnected to proxy server" << d->data->controlSocket->errorString();
dead code: QMessageLogger(__FILE__, 1381, __PRETTY_FUNCTION__).debug() << "waitForConnected to proxy server" << d->data->controlSocket->errorString();
-
1244 return
executed 2 times by 1 test: return false;
Executed by:
  • tst_QTcpServer
false;
executed 2 times by 1 test: return false;
Executed by:
  • tst_QTcpServer
2
1245 }-
1246 if (d->socks5State == QSocks5SocketEnginePrivate::BindSuccess
d->socks5State...e::BindSuccessDescription
TRUEevaluated 11 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
2-11
1247 setState(QAbstractSocket::BoundState);-
1248 return
executed 11 times by 3 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
true;
executed 11 times by 3 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
11
1249-
1250 } else if (d->socks5State == QSocks5SocketEnginePrivate::UdpAssociateSuccess
d->socks5State...sociateSuccessDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEnever evaluated
) {
0-2
1251 setState(QAbstractSocket::BoundState);-
1252 d->udpData->associateAddress = d->localAddress;-
1253 d->localAddress = QHostAddress();-
1254 d->udpData->associatePort = d->localPort;-
1255 d->localPort = 0;-
1256 QUdpSocket dummy;-
1257-
1258 dummy.setProperty("_q_networksession", property("_q_networksession"));-
1259-
1260 dummy.setProxy(QNetworkProxy::NoProxy);-
1261 if (!dummy.bind()
!dummy.bind()Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
0-2
1262 || writeDatagram(0,0, QIpPacketHeader(d->data->controlSocket->localAddress(), dummy.localPort())) != 0
writeDatagram(...lPort())) != 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
0-2
1263 || !dummy.waitForReadyRead(qt_subtract_from_timeout(msecs, stopWatch.elapsed()))
!dummy.waitFor...ch.elapsed()))Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
0-2
1264 || dummy.readDatagram(0,0, &d->localAddress, &d->localPort) != 0
dummy.readData...ocalPort) != 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
0-2
1265 if (0) QMessageLogger(__FILE__, 1403, __PRETTY_FUNCTION__).debug() << "udp actual address and port lookup failed";
dead code: QMessageLogger(__FILE__, 1403, __PRETTY_FUNCTION__).debug() << "udp actual address and port lookup failed";
-
1266 setState(QAbstractSocket::UnconnectedState);-
1267 setError(dummy.error(), dummy.errorString());-
1268 d->data->controlSocket->close();-
1269-
1270 return
never executed: return false;
false;
never executed: return false;
0
1271 }-
1272 if (0) QMessageLogger(__FILE__, 1410, __PRETTY_FUNCTION__).debug() << "udp actual address and port" << d->localAddress << ':' << d->localPort;
dead code: QMessageLogger(__FILE__, 1410, __PRETTY_FUNCTION__).debug() << "udp actual address and port" << d->localAddress << ':' << d->localPort;
-
1273 return
executed 2 times by 1 test: return true;
Executed by:
  • tst_qsocks5socketengine - unknown status
true;
executed 2 times by 1 test: return true;
Executed by:
  • tst_qsocks5socketengine - unknown status
2
1274-
1275 }-
1276-
1277-
1278 setError(QAbstractSocket::SocketTimeoutError,-
1279 QLatin1String("Network operation timed out"));-
1280-
1281-
1282-
1283 return
never executed: return false;
false;
never executed: return false;
0
1284}-
1285-
1286-
1287bool QSocks5SocketEngine::listen()-
1288{-
1289 QSocks5SocketEnginePrivate * const d = d_func();-
1290-
1291 if (0) QMessageLogger(__FILE__, 1429, __PRETTY_FUNCTION__).debug() << "listen()";
dead code: QMessageLogger(__FILE__, 1429, __PRETTY_FUNCTION__).debug() << "listen()";
-
1292-
1293-
1294 if (d->socketState == QAbstractSocket::BoundState
d->socketState...et::BoundStateDescription
TRUEevaluated 11 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
FALSEnever evaluated
) {
0-11
1295 d->socketState = QAbstractSocket::ListeningState;-
1296-
1297-
1298 if (d->socks5State == QSocks5SocketEnginePrivate::BindSuccess
d->socks5State...e::BindSuccessDescription
TRUEevaluated 11 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
FALSEnever evaluated
)
0-11
1299 d->emitReadNotification();
executed 11 times by 3 tests: d->emitReadNotification();
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
11
1300-
1301 return
executed 11 times by 3 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
true;
executed 11 times by 3 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
11
1302 }-
1303 return
never executed: return false;
false;
never executed: return false;
0
1304}-
1305-
1306int QSocks5SocketEngine::accept()-
1307{-
1308 QSocks5SocketEnginePrivate * const d = d_func();-
1309-
1310-
1311 if (0) QMessageLogger(__FILE__, 1449, __PRETTY_FUNCTION__).debug() << "accept()";
dead code: QMessageLogger(__FILE__, 1449, __PRETTY_FUNCTION__).debug() << "accept()";
-
1312-
1313 qintptr sd = -1;-
1314 switch (d->socks5State) {-
1315 case
executed 6 times by 3 tests: case QSocks5SocketEnginePrivate::BindSuccess:
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
QSocks5SocketEnginePrivate::BindSuccess:
executed 6 times by 3 tests: case QSocks5SocketEnginePrivate::BindSuccess:
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
6
1316 if (0) QMessageLogger(__FILE__, 1454, __PRETTY_FUNCTION__).debug() << "BindSuccess adding" << d->socketDescriptor << "to the bind store";
dead code: QMessageLogger(__FILE__, 1454, __PRETTY_FUNCTION__).debug() << "BindSuccess adding" << d->socketDescriptor << "to the bind store";
-
1317 d->data->controlSocket->disconnect();-
1318 d->data->controlSocket->setParent(0);-
1319 d->bindData->localAddress = d->localAddress;-
1320 d->bindData->localPort = d->localPort;-
1321 sd = d->socketDescriptor;-
1322 socks5BindStore()->add(sd, d->bindData);-
1323 d->data = 0;-
1324 d->bindData = 0;-
1325 d->socketDescriptor = 0;-
1326-
1327-
1328 d->socks5State = QSocks5SocketEnginePrivate::Uninitialized;-
1329 d->socketState = QAbstractSocket::UnconnectedState;-
1330 break;
executed 6 times by 3 tests: break;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
6
1331 case
never executed: case QSocks5SocketEnginePrivate::ControlSocketError:
QSocks5SocketEnginePrivate::ControlSocketError:
never executed: case QSocks5SocketEnginePrivate::ControlSocketError:
0
1332 setError(QAbstractSocket::ProxyProtocolError, QLatin1String("Control socket error"));-
1333 break;
never executed: break;
0
1334 default
never executed: default:
:
never executed: default:
0
1335 setError(QAbstractSocket::ProxyProtocolError, QLatin1String("SOCKS5 proxy error"));-
1336 break;
never executed: break;
0
1337 }-
1338 return
executed 6 times by 3 tests: return sd;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
sd;
executed 6 times by 3 tests: return sd;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
6
1339}-
1340-
1341void QSocks5SocketEngine::close()-
1342{-
1343 if (0) QMessageLogger(__FILE__, 1481, __PRETTY_FUNCTION__).debug() << "close()";
dead code: QMessageLogger(__FILE__, 1481, __PRETTY_FUNCTION__).debug() << "close()";
-
1344 QSocks5SocketEnginePrivate * const d = d_func();-
1345 if (d->data
d->dataDescription
TRUEevaluated 1008 times by 8 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
&& d->data->controlSocket
d->data->controlSocketDescription
TRUEevaluated 1008 times by 8 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
) {
0-1008
1346 if (d->data->controlSocket->state() == QAbstractSocket::ConnectedState
d->data->contr...ConnectedStateDescription
TRUEevaluated 298 times by 8 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 710 times by 5 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
) {
298-710
1347 int msecs = 100;-
1348 QElapsedTimer stopWatch;-
1349 stopWatch.start();-
1350 while (!d->data->controlSocket->bytesToWrite()
!d->data->cont...bytesToWrite()Description
TRUEevaluated 296 times by 8 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsslsocket - unknown status
) {
2-296
1351 if (!d->data->controlSocket->waitForBytesWritten(qt_subtract_from_timeout(msecs, stopWatch.elapsed()))
!d->data->cont...ch.elapsed()))Description
TRUEevaluated 296 times by 8 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
)
0-296
1352 break;
executed 296 times by 8 tests: break;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
296
1353 }
never executed: end of block
0
1354 }
executed 298 times by 8 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
298
1355 d->data->controlSocket->close();-
1356 }
executed 1008 times by 8 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
1008
1357 d->inboundStreamCount = d->outboundStreamCount = 0;-
1358-
1359 if (d->udpData
d->udpDataDescription
TRUEnever evaluated
FALSEevaluated 1013 times by 8 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
&& d->udpData->udpSocket
d->udpData->udpSocketDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-1013
1360 d->udpData->udpSocket->close();
never executed: d->udpData->udpSocket->close();
0
1361-
1362}
executed 1013 times by 8 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
1013
1363-
1364qint64 QSocks5SocketEngine::bytesAvailable() const-
1365{-
1366 const QSocks5SocketEnginePrivate * const d = d_func();-
1367 if (d->mode == QSocks5SocketEnginePrivate::ConnectMode
d->mode == QSo...e::ConnectModeDescription
TRUEevaluated 3280 times by 6 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
)
1-3280
1368 return
executed 3280 times by 6 tests: return d->connectData->readBuffer.size();
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
d->connectData->readBuffer.size();
executed 3280 times by 6 tests: return d->connectData->readBuffer.size();
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
3280
1369-
1370 else if (d->mode == QSocks5SocketEnginePrivate::UdpAssociateMode
d->mode == QSo...pAssociateModeDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
0-1
1371 && !d->udpData->pendingDatagrams.isEmpty()
!d->udpData->p...rams.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1372 return
never executed: return d->udpData->pendingDatagrams.first().data.size();
d->udpData->pendingDatagrams.first().data.size();
never executed: return d->udpData->pendingDatagrams.first().data.size();
0
1373-
1374 return
executed 1 time by 1 test: return 0;
Executed by:
  • tst_qsocks5socketengine - unknown status
0;
executed 1 time by 1 test: return 0;
Executed by:
  • tst_qsocks5socketengine - unknown status
1
1375}-
1376-
1377qint64 QSocks5SocketEngine::read(char *data, qint64 maxlen)-
1378{-
1379 QSocks5SocketEnginePrivate * const d = d_func();-
1380 if (0) QMessageLogger(__FILE__, 1518, __PRETTY_FUNCTION__).debug() << "read( , maxlen = " << maxlen << ')';
dead code: QMessageLogger(__FILE__, 1518, __PRETTY_FUNCTION__).debug() << "read( , maxlen = " << maxlen << ')';
-
1381 if (d->mode == QSocks5SocketEnginePrivate::ConnectMode
d->mode == QSo...e::ConnectModeDescription
TRUEevaluated 3283 times by 6 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
FALSEnever evaluated
) {
0-3283
1382 if (d->connectData->readBuffer.size() == 0
d->connectData...er.size() == 0Description
TRUEevaluated 355 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
FALSEevaluated 2928 times by 6 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
) {
355-2928
1383 if (d->data->controlSocket->state() == QAbstractSocket::UnconnectedState
d->data->contr...connectedStateDescription
TRUEevaluated 353 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsslsocket - unknown status
) {
2-353
1384-
1385 close();-
1386 setError(QAbstractSocket::RemoteHostClosedError,-
1387 QLatin1String("Remote host closed connection###"));-
1388 setState(QAbstractSocket::UnconnectedState);-
1389 return
executed 353 times by 3 tests: return -1;
Executed by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
-1;
executed 353 times by 3 tests: return -1;
Executed by:
  • tst_QFtp
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
353
1390 } else {-
1391 return
executed 2 times by 1 test: return 0;
Executed by:
  • tst_qsslsocket - unknown status
0;
executed 2 times by 1 test: return 0;
Executed by:
  • tst_qsslsocket - unknown status
2
1392 }-
1393 }-
1394 qint64 copy = qMin<qint64>(d->connectData->readBuffer.size(), maxlen);-
1395 memcpy(data, d->connectData->readBuffer.constData(), copy);-
1396 d->connectData->readBuffer.remove(0, copy);-
1397 if (0) QMessageLogger(__FILE__, 1535, __PRETTY_FUNCTION__).debug() << "read" << dump(QByteArray(data, copy));
dead code: QMessageLogger(__FILE__, 1535, __PRETTY_FUNCTION__).debug() << "read" << dump(QByteArray(data, copy));
-
1398 return
executed 2928 times by 6 tests: return copy;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
copy;
executed 2928 times by 6 tests: return copy;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
2928
1399-
1400 } else if (d->mode == QSocks5SocketEnginePrivate::UdpAssociateMode
d->mode == QSo...pAssociateModeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1401 return
never executed: return readDatagram(data, maxlen);
readDatagram(data, maxlen);
never executed: return readDatagram(data, maxlen);
0
1402-
1403 }-
1404 return
never executed: return 0;
0;
never executed: return 0;
0
1405}-
1406-
1407qint64 QSocks5SocketEngine::write(const char *data, qint64 len)-
1408{-
1409 QSocks5SocketEnginePrivate * const d = d_func();-
1410 if (0) QMessageLogger(__FILE__, 1548, __PRETTY_FUNCTION__).debug() << "write" << dump(QByteArray(data, len));
dead code: QMessageLogger(__FILE__, 1548, __PRETTY_FUNCTION__).debug() << "write" << dump(QByteArray(data, len));
-
1411-
1412 if (d->mode == QSocks5SocketEnginePrivate::ConnectMode
d->mode == QSo...e::ConnectModeDescription
TRUEevaluated 1891 times by 6 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
1-1891
1413-
1414 len = qMin<qint64>(len, MaxWriteBufferSize) - d->data->controlSocket->bytesToWrite();-
1415 if (len <= 0
len <= 0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qsslsocket - unknown status
FALSEevaluated 1887 times by 6 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
)
4-1887
1416 return
executed 4 times by 1 test: return 0;
Executed by:
  • tst_qsslsocket - unknown status
0;
executed 4 times by 1 test: return 0;
Executed by:
  • tst_qsslsocket - unknown status
4
1417-
1418 QByteArray buf = QByteArray::fromRawData(data, len);-
1419 QByteArray sealedBuf;-
1420 if (!d->data->authenticator->seal(buf, &sealedBuf)
!d->data->auth...f, &sealedBuf)Description
TRUEnever evaluated
FALSEevaluated 1887 times by 6 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
) {
0-1887
1421-
1422 }
never executed: end of block
0
1423-
1424 qint64 written = d->data->controlSocket->write(sealedBuf);-
1425 if (written <= 0
written <= 0Description
TRUEnever evaluated
FALSEevaluated 1887 times by 6 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
) {
0-1887
1426 if (0) QMessageLogger(__FILE__, 1564, __PRETTY_FUNCTION__).debug() << "native write returned" << written;
dead code: QMessageLogger(__FILE__, 1564, __PRETTY_FUNCTION__).debug() << "native write returned" << written;
-
1427 return
never executed: return written;
written;
never executed: return written;
0
1428 }-
1429 d->data->controlSocket->waitForBytesWritten(0);-
1430-
1431 return
executed 1887 times by 6 tests: return len;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
len;
executed 1887 times by 6 tests: return len;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
1887
1432-
1433 } else if (d->mode == QSocks5SocketEnginePrivate::UdpAssociateMode
d->mode == QSo...pAssociateModeDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEnever evaluated
) {
0-1
1434-
1435 return
executed 1 time by 1 test: return writeDatagram(data, len, QIpPacketHeader(d->peerAddress, d->peerPort));
Executed by:
  • tst_qsocks5socketengine - unknown status
writeDatagram(data, len, QIpPacketHeader(d->peerAddress, d->peerPort));
executed 1 time by 1 test: return writeDatagram(data, len, QIpPacketHeader(d->peerAddress, d->peerPort));
Executed by:
  • tst_qsocks5socketengine - unknown status
1
1436-
1437 }-
1438-
1439 return
never executed: return -1;
-1;
never executed: return -1;
0
1440}-
1441-
1442-
1443-
1444bool QSocks5SocketEngine::joinMulticastGroup(const QHostAddress &,-
1445 const QNetworkInterface &)-
1446{-
1447 setError(QAbstractSocket::UnsupportedSocketOperationError,-
1448 QLatin1String("Operation on socket is not supported"));-
1449 return
never executed: return false;
false;
never executed: return false;
0
1450}-
1451-
1452bool QSocks5SocketEngine::leaveMulticastGroup(const QHostAddress &,-
1453 const QNetworkInterface &)-
1454{-
1455 setError(QAbstractSocket::UnsupportedSocketOperationError,-
1456 QLatin1String("Operation on socket is not supported"));-
1457 return
never executed: return false;
false;
never executed: return false;
0
1458}-
1459-
1460-
1461QNetworkInterface QSocks5SocketEngine::multicastInterface() const-
1462{-
1463 return
never executed: return QNetworkInterface();
QNetworkInterface();
never executed: return QNetworkInterface();
0
1464}-
1465-
1466bool QSocks5SocketEngine::setMulticastInterface(const QNetworkInterface &)-
1467{-
1468 setError(QAbstractSocket::UnsupportedSocketOperationError,-
1469 QLatin1String("Operation on socket is not supported"));-
1470 return
never executed: return false;
false;
never executed: return false;
0
1471}-
1472-
1473-
1474qint64 QSocks5SocketEngine::readDatagram(char *data, qint64 maxlen, QIpPacketHeader *header, PacketHeaderOptions)-
1475{-
1476 QSocks5SocketEnginePrivate * const d = d_func();-
1477-
1478 d->checkForDatagrams();-
1479-
1480 if (d->udpData->pendingDatagrams.isEmpty()
d->udpData->pe...rams.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1481 return
never executed: return 0;
0;
never executed: return 0;
0
1482-
1483 QSocks5RevivedDatagram datagram = d->udpData->pendingDatagrams.dequeue();-
1484 int copyLen = qMin<int>(maxlen, datagram.data.size());-
1485 memcpy(data, datagram.data.constData(), copyLen);-
1486 header->senderAddress = datagram.address;-
1487 header->senderPort = datagram.port;-
1488 return
never executed: return copyLen;
copyLen;
never executed: return copyLen;
0
1489}-
1490-
1491qint64 QSocks5SocketEngine::writeDatagram(const char *data, qint64 len, const QIpPacketHeader &header)-
1492{-
1493 QSocks5SocketEnginePrivate * const d = d_func();-
1494-
1495-
1496 if (!d->data
!d->dataDescription
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
0-3
1497 d->initialize(QSocks5SocketEnginePrivate::UdpAssociateMode);-
1498-
1499 if (!bind(QHostAddress(QLatin1String("0.0.0.0")), 0)
!bind(QHostAdd...0.0.0.0")), 0)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1500-
1501 return
never executed: return -1;
-1;
never executed: return -1;
0
1502 }-
1503 }
never executed: end of block
0
1504-
1505 QByteArray outBuf;-
1506 outBuf.reserve(270 + len);-
1507 outBuf[0] = 0x00;-
1508 outBuf[1] = 0x00;-
1509 outBuf[2] = 0x00;-
1510 if (!qt_socks5_set_host_address_and_port(header.destinationAddress, header.destinationPort, &outBuf)
!qt_socks5_set...Port, &outBuf)Description
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
0-3
1511 }
never executed: end of block
0
1512 outBuf += QByteArray(data, len);-
1513 if (0) QMessageLogger(__FILE__, 1651, __PRETTY_FUNCTION__).debug() << "sending" << dump(outBuf);
dead code: QMessageLogger(__FILE__, 1651, __PRETTY_FUNCTION__).debug() << "sending" << dump(outBuf);
-
1514 QByteArray sealedBuf;-
1515 if (!d->data->authenticator->seal(outBuf, &sealedBuf)
!d->data->auth...f, &sealedBuf)Description
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
0-3
1516 if (0) QMessageLogger(__FILE__, 1654, __PRETTY_FUNCTION__).debug() << "sealing data failed";
dead code: QMessageLogger(__FILE__, 1654, __PRETTY_FUNCTION__).debug() << "sealing data failed";
-
1517 setError(QAbstractSocket::SocketAccessError, d->data->authenticator->errorString());-
1518 return
never executed: return -1;
-1;
never executed: return -1;
0
1519 }-
1520 if (d->udpData->udpSocket->writeDatagram(sealedBuf, d->udpData->associateAddress, d->udpData->associatePort) != sealedBuf.size()
d->udpData->ud...aledBuf.size()Description
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
0-3
1521-
1522 if (d->udpData->udpSocket->error() == QAbstractSocket::DatagramTooLargeError
d->udpData->ud...mTooLargeErrorDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1523 setError(d->udpData->udpSocket->error(), d->udpData->udpSocket->errorString());
never executed: setError(d->udpData->udpSocket->error(), d->udpData->udpSocket->errorString());
0
1524-
1525 return
never executed: return -1;
-1;
never executed: return -1;
0
1526 }-
1527-
1528 return
executed 3 times by 1 test: return len;
Executed by:
  • tst_qsocks5socketengine - unknown status
len;
executed 3 times by 1 test: return len;
Executed by:
  • tst_qsocks5socketengine - unknown status
3
1529}-
1530-
1531bool QSocks5SocketEngine::hasPendingDatagrams() const-
1532{-
1533 const QSocks5SocketEnginePrivate * const d = d_func();-
1534 do { if (!d->data
!d->dataDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEnever evaluated
) { return
executed 1 time by 1 test: return false;
Executed by:
  • tst_qsocks5socketengine - unknown status
false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_qsocks5socketengine - unknown status
} } while (0);
0-1
1535-
1536 d->checkForDatagrams();-
1537-
1538 return
never executed: return !d->udpData->pendingDatagrams.isEmpty();
!d->udpData->pendingDatagrams.isEmpty();
never executed: return !d->udpData->pendingDatagrams.isEmpty();
0
1539}-
1540-
1541qint64 QSocks5SocketEngine::pendingDatagramSize() const-
1542{-
1543 const QSocks5SocketEnginePrivate * const d = d_func();-
1544-
1545 d->checkForDatagrams();-
1546-
1547 if (!d->udpData->pendingDatagrams.isEmpty()
!d->udpData->p...rams.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1548 return
never executed: return d->udpData->pendingDatagrams.head().data.size();
d->udpData->pendingDatagrams.head().data.size();
never executed: return d->udpData->pendingDatagrams.head().data.size();
0
1549 return
never executed: return 0;
0;
never executed: return 0;
0
1550}-
1551-
1552-
1553qint64 QSocks5SocketEngine::bytesToWrite() const-
1554{-
1555 const QSocks5SocketEnginePrivate * const d = d_func();-
1556 if (d->data
d->dataDescription
TRUEevaluated 4687 times by 5 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsslsocket - unknown status
FALSEnever evaluated
&& d->data->controlSocket
d->data->controlSocketDescription
TRUEevaluated 4687 times by 5 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsslsocket - unknown status
FALSEnever evaluated
) {
0-4687
1557 return
executed 4687 times by 5 tests: return d->data->controlSocket->bytesToWrite();
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsslsocket - unknown status
d->data->controlSocket->bytesToWrite();
executed 4687 times by 5 tests: return d->data->controlSocket->bytesToWrite();
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsslsocket - unknown status
4687
1558 } else {-
1559 return
never executed: return 0;
0;
never executed: return 0;
0
1560 }-
1561}-
1562-
1563int QSocks5SocketEngine::option(SocketOption option) const-
1564{-
1565 const QSocks5SocketEnginePrivate * const d = d_func();-
1566 if (d->data
d->dataDescription
TRUEnever evaluated
FALSEnever evaluated
&& d->data->controlSocket
d->data->controlSocketDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1567-
1568 if (option == QAbstractSocketEngine::LowDelayOption
option == QAbs...LowDelayOptionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1569 return
never executed: return d->data->controlSocket->socketOption(QAbstractSocket::LowDelayOption).toInt();
d->data->controlSocket->socketOption(QAbstractSocket::LowDelayOption).toInt();
never executed: return d->data->controlSocket->socketOption(QAbstractSocket::LowDelayOption).toInt();
0
1570 if (option == QAbstractSocketEngine::KeepAliveOption
option == QAbs...eepAliveOptionDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1571 return
never executed: return d->data->controlSocket->socketOption(QAbstractSocket::KeepAliveOption).toInt();
d->data->controlSocket->socketOption(QAbstractSocket::KeepAliveOption).toInt();
never executed: return d->data->controlSocket->socketOption(QAbstractSocket::KeepAliveOption).toInt();
0
1572 }
never executed: end of block
0
1573 return
never executed: return -1;
-1;
never executed: return -1;
0
1574}-
1575-
1576bool QSocks5SocketEngine::setOption(SocketOption option, int value)-
1577{-
1578 QSocks5SocketEnginePrivate * const d = d_func();-
1579 if (d->data
d->dataDescription
TRUEevaluated 345 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 12 times by 2 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
&& d->data->controlSocket
d->data->controlSocketDescription
TRUEevaluated 345 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
FALSEnever evaluated
) {
0-345
1580-
1581 if (option == QAbstractSocketEngine::LowDelayOption
option == QAbs...LowDelayOptionDescription
TRUEevaluated 294 times by 1 test
Evaluated by:
  • tst_QFtp
FALSEevaluated 51 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
)
51-294
1582 d->data->controlSocket->setSocketOption(QAbstractSocket::LowDelayOption, value);
executed 294 times by 1 test: d->data->controlSocket->setSocketOption(QAbstractSocket::LowDelayOption, value);
Executed by:
  • tst_QFtp
294
1583 if (option == QAbstractSocketEngine::KeepAliveOption
option == QAbs...eepAliveOptionDescription
TRUEevaluated 51 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_Spdy
FALSEevaluated 294 times by 1 test
Evaluated by:
  • tst_QFtp
)
51-294
1584 d->data->controlSocket->setSocketOption(QAbstractSocket::KeepAliveOption, value);
executed 51 times by 2 tests: d->data->controlSocket->setSocketOption(QAbstractSocket::KeepAliveOption, value);
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
51
1585 return
executed 345 times by 3 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
true;
executed 345 times by 3 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
345
1586 }-
1587 return
executed 12 times by 2 tests: return false;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
false;
executed 12 times by 2 tests: return false;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
12
1588}-
1589-
1590bool QSocks5SocketEnginePrivate::waitForConnected(int msecs, bool *timedOut)-
1591{-
1592 if (data->controlSocket->state() == QAbstractSocket::UnconnectedState
data->controlS...connectedStateDescription
TRUEnever evaluated
FALSEevaluated 494 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
)
0-494
1593 return
never executed: return false;
false;
never executed: return false;
0
1594-
1595 const Socks5State wantedState =-
1596 mode == ConnectMode
mode == ConnectModeDescription
TRUEevaluated 476 times by 6 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 18 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
? Connected :
18-476
1597 mode == BindMode
mode == BindModeDescription
TRUEevaluated 15 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
? BindSuccess :
3-15
1598 UdpAssociateSuccess;-
1599-
1600 QElapsedTimer stopWatch;-
1601 stopWatch.start();-
1602-
1603 while (socks5State != wantedState
socks5State != wantedStateDescription
TRUEevaluated 352 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 479 times by 5 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
) {
352-479
1604 if (!data->controlSocket->waitForReadyRead(qt_subtract_from_timeout(msecs, stopWatch.elapsed()))
!data->control...ch.elapsed()))Description
TRUEevaluated 15 times by 5 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 337 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
15-337
1605 if (data->controlSocket->state() == QAbstractSocket::UnconnectedState
data->controlS...connectedStateDescription
TRUEevaluated 8 times by 4 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 7 times by 3 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
)
7-8
1606 return
executed 8 times by 4 tests: return true;
Executed by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
true;
executed 8 times by 4 tests: return true;
Executed by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
8
1607-
1608 setErrorState(QSocks5SocketEnginePrivate::ControlSocketError);-
1609 if (timedOut
timedOutDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QTcpServer
&& data->controlSocket->error() == QAbstractSocket::SocketTimeoutError
data->controlS...etTimeoutErrorDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
)
0-6
1610 *
executed 6 times by 2 tests: *timedOut = true;
Executed by:
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
timedOut = true;
executed 6 times by 2 tests: *timedOut = true;
Executed by:
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
6
1611 return
executed 7 times by 3 tests: return false;
Executed by:
  • tst_QTcpServer
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
false;
executed 7 times by 3 tests: return false;
Executed by:
  • tst_QTcpServer
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
7
1612 }-
1613 }
executed 337 times by 7 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
337
1614-
1615 return
executed 479 times by 5 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
true;
executed 479 times by 5 tests: return true;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
479
1616}-
1617-
1618bool QSocks5SocketEngine::waitForRead(int msecs, bool *timedOut)-
1619{-
1620 QSocks5SocketEnginePrivate * const d = d_func();-
1621 if (0) QMessageLogger(__FILE__, 1759, __PRETTY_FUNCTION__).debug() << "waitForRead" << msecs;
dead code: QMessageLogger(__FILE__, 1759, __PRETTY_FUNCTION__).debug() << "waitForRead" << msecs;
-
1622-
1623 d->readNotificationActivated = false;-
1624-
1625 QElapsedTimer stopWatch;-
1626 stopWatch.start();-
1627-
1628-
1629 if (!d->waitForConnected(msecs, timedOut)
!d->waitForCon...ecs, timedOut)Description
TRUEnever evaluated
FALSEevaluated 187 times by 3 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
)
0-187
1630 return
never executed: return false;
false;
never executed: return false;
0
1631 if (d->data->controlSocket->state() == QAbstractSocket::UnconnectedState
d->data->contr...connectedStateDescription
TRUEnever evaluated
FALSEevaluated 187 times by 3 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
)
0-187
1632 return
never executed: return true;
true;
never executed: return true;
0
1633-
1634-
1635 if (d->mode == QSocks5SocketEnginePrivate::ConnectMode
d->mode == QSo...e::ConnectModeDescription
TRUEevaluated 184 times by 3 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
FALSEevaluated 3 times by 2 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
||
3-184
1636 d->mode == QSocks5SocketEnginePrivate::BindMode
d->mode == QSo...vate::BindModeDescription
TRUEevaluated 2 times by 2 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
) {
1-2
1637 while (!d->readNotificationActivated
!d->readNotificationActivatedDescription
TRUEevaluated 186 times by 3 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
FALSEevaluated 179 times by 3 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
) {
179-186
1638 if (!d->data->controlSocket->waitForReadyRead(qt_subtract_from_timeout(msecs, stopWatch.elapsed()))
!d->data->cont...ch.elapsed()))Description
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
FALSEevaluated 179 times by 3 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
) {
7-179
1639 if (d->data->controlSocket->state() == QAbstractSocket::UnconnectedState
d->data->contr...connectedStateDescription
TRUEevaluated 5 times by 2 tests
Evaluated by:
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsslsocket - unknown status
)
2-5
1640 return
executed 5 times by 2 tests: return true;
Executed by:
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
true;
executed 5 times by 2 tests: return true;
Executed by:
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
5
1641-
1642 setError(d->data->controlSocket->error(), d->data->controlSocket->errorString());-
1643 if (timedOut
timedOutDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qsslsocket - unknown status
&& d->data->controlSocket->error() == QAbstractSocket::SocketTimeoutError
d->data->contr...etTimeoutErrorDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-2
1644 *
never executed: *timedOut = true;
timedOut = true;
never executed: *timedOut = true;
0
1645 return
executed 2 times by 1 test: return false;
Executed by:
  • tst_qsslsocket - unknown status
false;
executed 2 times by 1 test: return false;
Executed by:
  • tst_qsslsocket - unknown status
2
1646 }-
1647 }
executed 179 times by 3 tests: end of block
Executed by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
179
1648-
1649 }
executed 179 times by 3 tests: end of block
Executed by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
else {
179
1650 while (!d->readNotificationActivated
!d->readNotificationActivatedDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEnever evaluated
) {
0-1
1651 if (!d->udpData->udpSocket->waitForReadyRead(qt_subtract_from_timeout(msecs, stopWatch.elapsed()))
!d->udpData->u...ch.elapsed()))Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
FALSEnever evaluated
) {
0-1
1652 setError(d->udpData->udpSocket->error(), d->udpData->udpSocket->errorString());-
1653 if (timedOut
timedOutDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qsocks5socketengine - unknown status
&& d->udpData->udpSocket->error() == QAbstractSocket::SocketTimeoutError
d->udpData->ud...etTimeoutErrorDescription
TRUEnever evaluated
FALSEnever evaluated
)
0-1
1654 *
never executed: *timedOut = true;
timedOut = true;
never executed: *timedOut = true;
0
1655 return
executed 1 time by 1 test: return false;
Executed by:
  • tst_qsocks5socketengine - unknown status
false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_qsocks5socketengine - unknown status
1
1656 }-
1657 }
never executed: end of block
0
1658-
1659 }
never executed: end of block
0
1660-
1661-
1662 bool ret = d->readNotificationActivated;-
1663 d->readNotificationActivated = false;-
1664-
1665 if (0) QMessageLogger(__FILE__, 1803, __PRETTY_FUNCTION__).debug() << "waitForRead returned" << ret;
dead code: QMessageLogger(__FILE__, 1803, __PRETTY_FUNCTION__).debug() << "waitForRead returned" << ret;
-
1666 return
executed 179 times by 3 tests: return ret;
Executed by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
ret;
executed 179 times by 3 tests: return ret;
Executed by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
179
1667}-
1668-
1669-
1670bool QSocks5SocketEngine::waitForWrite(int msecs, bool *timedOut)-
1671{-
1672 QSocks5SocketEnginePrivate * const d = d_func();-
1673 if (0) QMessageLogger(__FILE__, 1811, __PRETTY_FUNCTION__).debug() << "waitForWrite" << msecs;
dead code: QMessageLogger(__FILE__, 1811, __PRETTY_FUNCTION__).debug() << "waitForWrite" << msecs;
-
1674-
1675 QElapsedTimer stopWatch;-
1676 stopWatch.start();-
1677-
1678-
1679 if (!d->waitForConnected(msecs, timedOut)
!d->waitForCon...ecs, timedOut)Description
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 286 times by 5 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
)
6-286
1680 return
executed 6 times by 2 tests: return false;
Executed by:
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
false;
executed 6 times by 2 tests: return false;
Executed by:
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
6
1681 if (d->data->controlSocket->state() == QAbstractSocket::UnconnectedState
d->data->contr...connectedStateDescription
TRUEevaluated 7 times by 3 tests
Evaluated by:
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 279 times by 4 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
)
7-279
1682 return
executed 7 times by 3 tests: return true;
Executed by:
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
true;
executed 7 times by 3 tests: return true;
Executed by:
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qtcpsocket - unknown status
7
1683-
1684-
1685-
1686-
1687 if (d->data->controlSocket->bytesToWrite()
d->data->contr...bytesToWrite()Description
TRUEnever evaluated
FALSEevaluated 279 times by 4 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
)
0-279
1688 d->data->controlSocket->waitForBytesWritten(qt_subtract_from_timeout(msecs, stopWatch.elapsed()));
never executed: d->data->controlSocket->waitForBytesWritten(qt_subtract_from_timeout(msecs, stopWatch.elapsed()));
0
1689 while ((msecs == -1
msecs == -1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qsslsocket - unknown status
FALSEevaluated 273 times by 4 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
|| stopWatch.elapsed() < msecs
stopWatch.elapsed() < msecsDescription
TRUEevaluated 273 times by 4 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
)
0-273
1690 && d->data->controlSocket->state() == QAbstractSocket::ConnectedState
d->data->contr...ConnectedStateDescription
TRUEevaluated 279 times by 4 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
0-279
1691 && d->data->controlSocket->bytesToWrite() >= MaxWriteBufferSize
d->data->contr...riteBufferSizeDescription
TRUEnever evaluated
FALSEevaluated 279 times by 4 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
)
0-279
1692 d->data->controlSocket->waitForBytesWritten(qt_subtract_from_timeout(msecs, stopWatch.elapsed()));
never executed: d->data->controlSocket->waitForBytesWritten(qt_subtract_from_timeout(msecs, stopWatch.elapsed()));
0
1693 return
executed 279 times by 4 tests: return d->data->controlSocket->bytesToWrite() < MaxWriteBufferSize;
Executed by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
d->data->controlSocket->bytesToWrite() < MaxWriteBufferSize;
executed 279 times by 4 tests: return d->data->controlSocket->bytesToWrite() < MaxWriteBufferSize;
Executed by:
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
279
1694}-
1695-
1696bool QSocks5SocketEngine::waitForReadOrWrite(bool *readyToRead, bool *readyToWrite,-
1697 bool checkRead, bool checkWrite,-
1698 int msecs, bool *timedOut)-
1699{-
1700 (void)checkRead;;-
1701 if (!checkWrite
!checkWriteDescription
TRUEevaluated 174 times by 2 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsslsocket - unknown status
FALSEevaluated 184 times by 1 test
Evaluated by:
  • tst_qsslsocket - unknown status
) {
174-184
1702 bool canRead = waitForRead(msecs, timedOut);-
1703 if (readyToRead
readyToReadDescription
TRUEevaluated 174 times by 2 tests
Evaluated by:
  • tst_QTcpServer
  • tst_qsslsocket - unknown status
FALSEnever evaluated
)
0-174
1704 *
executed 174 times by 2 tests: *readyToRead = canRead;
Executed by:
  • tst_QTcpServer
  • tst_qsslsocket - unknown status
readyToRead = canRead;
executed 174 times by 2 tests: *readyToRead = canRead;
Executed by:
  • tst_QTcpServer
  • tst_qsslsocket - unknown status
174
1705 return
executed 174 times by 2 tests: return canRead;
Executed by:
  • tst_QTcpServer
  • tst_qsslsocket - unknown status
canRead;
executed 174 times by 2 tests: return canRead;
Executed by:
  • tst_QTcpServer
  • tst_qsslsocket - unknown status
174
1706 }-
1707-
1708 bool canWrite = waitForWrite(msecs, timedOut);-
1709 if (readyToWrite
readyToWriteDescription
TRUEevaluated 184 times by 1 test
Evaluated by:
  • tst_qsslsocket - unknown status
FALSEnever evaluated
)
0-184
1710 *
executed 184 times by 1 test: *readyToWrite = canWrite;
Executed by:
  • tst_qsslsocket - unknown status
readyToWrite = canWrite;
executed 184 times by 1 test: *readyToWrite = canWrite;
Executed by:
  • tst_qsslsocket - unknown status
184
1711 return
executed 184 times by 1 test: return canWrite;
Executed by:
  • tst_qsslsocket - unknown status
canWrite;
executed 184 times by 1 test: return canWrite;
Executed by:
  • tst_qsslsocket - unknown status
184
1712}-
1713-
1714bool QSocks5SocketEngine::isReadNotificationEnabled() const-
1715{-
1716 const QSocks5SocketEnginePrivate * const d = d_func();-
1717 return
executed 3016 times by 5 tests: return d->readNotificationEnabled;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsslsocket - unknown status
d->readNotificationEnabled;
executed 3016 times by 5 tests: return d->readNotificationEnabled;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsslsocket - unknown status
3016
1718}-
1719-
1720void QSocks5SocketEngine::setReadNotificationEnabled(bool enable)-
1721{-
1722 QSocks5SocketEnginePrivate * const d = d_func();-
1723-
1724 if (0) QMessageLogger(__FILE__, 1862, __PRETTY_FUNCTION__).debug() << "setReadNotificationEnabled(" << enable << ')';
dead code: QMessageLogger(__FILE__, 1862, __PRETTY_FUNCTION__).debug() << "setReadNotificationEnabled(" << enable << ')';
-
1725-
1726 bool emitSignal = false;-
1727 if (!d->readNotificationEnabled
!d->readNotificationEnabledDescription
TRUEevaluated 786 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 3229 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
786-3229
1728 && enable
enableDescription
TRUEevaluated 696 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 90 times by 4 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
) {
90-696
1729 if (d->mode == QSocks5SocketEnginePrivate::ConnectMode
d->mode == QSo...e::ConnectModeDescription
TRUEevaluated 686 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
)
10-686
1730 emitSignal = !d->connectData->readBuffer.isEmpty();
executed 686 times by 7 tests: emitSignal = !d->connectData->readBuffer.isEmpty();
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
686
1731-
1732 else if (d->mode == QSocks5SocketEnginePrivate::UdpAssociateMode
d->mode == QSo...pAssociateModeDescription
TRUEnever evaluated
FALSEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
)
0-10
1733 emitSignal = !d->udpData->pendingDatagrams.isEmpty();
never executed: emitSignal = !d->udpData->pendingDatagrams.isEmpty();
0
1734-
1735 else if (d->mode == QSocks5SocketEnginePrivate::BindMode
d->mode == QSo...vate::BindModeDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
FALSEnever evaluated
0-10
1736 && d->socketState == QAbstractSocket::ListeningState
d->socketState...ListeningStateDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
FALSEnever evaluated
0-10
1737 && d->socks5State == QSocks5SocketEnginePrivate::BindSuccess
d->socks5State...e::BindSuccessDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
FALSEnever evaluated
)
0-10
1738 emitSignal = true;
executed 10 times by 2 tests: emitSignal = true;
Executed by:
  • tst_QFtp
  • tst_QTcpServer
10
1739 }
executed 696 times by 7 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
696
1740-
1741 d->readNotificationEnabled = enable;-
1742-
1743 if (emitSignal
emitSignalDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
FALSEevaluated 4005 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
)
10-4005
1744 d->emitReadNotification();
executed 10 times by 2 tests: d->emitReadNotification();
Executed by:
  • tst_QFtp
  • tst_QTcpServer
10
1745}
executed 4015 times by 7 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
4015
1746-
1747bool QSocks5SocketEngine::isWriteNotificationEnabled() const-
1748{-
1749 const QSocks5SocketEnginePrivate * const d = d_func();-
1750 return
executed 1923 times by 5 tests: return d->writeNotificationEnabled;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsslsocket - unknown status
d->writeNotificationEnabled;
executed 1923 times by 5 tests: return d->writeNotificationEnabled;
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsslsocket - unknown status
1923
1751}-
1752-
1753void QSocks5SocketEngine::setWriteNotificationEnabled(bool enable)-
1754{-
1755 QSocks5SocketEnginePrivate * const d = d_func();-
1756 d->writeNotificationEnabled = enable;-
1757 if (enable
enableDescription
TRUEevaluated 2794 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 4258 times by 5 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsslsocket - unknown status
&& d->socketState == QAbstractSocket::ConnectedState
d->socketState...ConnectedStateDescription
TRUEevaluated 2553 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEevaluated 241 times by 5 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
) {
241-4258
1758 if (d->mode == QSocks5SocketEnginePrivate::ConnectMode
d->mode == QSo...e::ConnectModeDescription
TRUEevaluated 2553 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
FALSEnever evaluated
&& d->data->controlSocket->bytesToWrite()
d->data->contr...bytesToWrite()Description
TRUEevaluated 32 times by 2 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_qsslsocket - unknown status
FALSEevaluated 2521 times by 7 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
)
0-2553
1759 return;
executed 32 times by 2 tests: return;
Executed by:
  • tst_QNetworkReply
  • tst_qsslsocket - unknown status
32
1760 d->emitWriteNotification();-
1761 d->writeNotificationActivated = false;-
1762 }
executed 2521 times by 7 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
2521
1763}
executed 7020 times by 7 tests: end of block
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
7020
1764-
1765bool QSocks5SocketEngine::isExceptionNotificationEnabled() const-
1766{-
1767 const QSocks5SocketEnginePrivate * const d = d_func();-
1768 return
executed 81 times by 3 tests: return d->exceptNotificationEnabled;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
d->exceptNotificationEnabled;
executed 81 times by 3 tests: return d->exceptNotificationEnabled;
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
81
1769}-
1770-
1771void QSocks5SocketEngine::setExceptionNotificationEnabled(bool enable)-
1772{-
1773 QSocks5SocketEnginePrivate * const d = d_func();-
1774 d->exceptNotificationEnabled = enable;-
1775}
executed 162 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_Spdy
  • tst_qsslsocket - unknown status
162
1776-
1777QAbstractSocketEngine *-
1778QSocks5SocketEngineHandler::createSocketEngine(QAbstractSocket::SocketType socketType,-
1779 const QNetworkProxy &proxy, QObject *parent)-
1780{-
1781 (void)socketType;;-
1782-
1783-
1784 if (proxy.type() != QNetworkProxy::Socks5Proxy
proxy.type() !...y::Socks5ProxyDescription
TRUEevaluated 4743 times by 28 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
FALSEevaluated 711 times by 9 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
) {
711-4743
1785 if (0) QMessageLogger(__FILE__, 1923, __PRETTY_FUNCTION__).debug() << "not proxying";
dead code: QMessageLogger(__FILE__, 1923, __PRETTY_FUNCTION__).debug() << "not proxying";
-
1786 return
executed 4743 times by 28 tests: return 0;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
0;
executed 4743 times by 28 tests: return 0;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qiodevice - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • ...
4743
1787 }-
1788 QScopedPointer<QSocks5SocketEngine> engine(new QSocks5SocketEngine(parent));-
1789 engine->setProxy(proxy);-
1790 return
executed 711 times by 9 tests: return engine.take();
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
engine.take();
executed 711 times by 9 tests: return engine.take();
Executed by:
  • tst_QFtp
  • tst_QNetworkReply
  • tst_QTcpServer
  • tst_Spdy
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qsslsocket_onDemandCertificates_member - unknown status
  • tst_qsslsocket_onDemandCertificates_static - unknown status
  • tst_qtcpsocket - unknown status
711
1791}-
1792-
1793QAbstractSocketEngine *QSocks5SocketEngineHandler::createSocketEngine(qintptr socketDescriptor, QObject *parent)-
1794{-
1795 if (0) QMessageLogger(__FILE__, 1933, __PRETTY_FUNCTION__).debug() << "createSocketEngine" << socketDescriptor;
dead code: QMessageLogger(__FILE__, 1933, __PRETTY_FUNCTION__).debug() << "createSocketEngine" << socketDescriptor;
-
1796 if (socks5BindStore()->contains(socketDescriptor)
socks5BindStor...ketDescriptor)Description
TRUEevaluated 5 times by 2 tests
Evaluated by:
  • tst_QFtp
  • tst_QTcpServer
FALSEevaluated 994 times by 18 tests
Evaluated by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
) {
5-994
1797 if (0) QMessageLogger(__FILE__, 1935, __PRETTY_FUNCTION__).debug() << "bind store contains" << socketDescriptor;
dead code: QMessageLogger(__FILE__, 1935, __PRETTY_FUNCTION__).debug() << "bind store contains" << socketDescriptor;
-
1798 return
executed 5 times by 2 tests: return new QSocks5SocketEngine(parent);
Executed by:
  • tst_QFtp
  • tst_QTcpServer
new QSocks5SocketEngine(parent);
executed 5 times by 2 tests: return new QSocks5SocketEngine(parent);
Executed by:
  • tst_QFtp
  • tst_QTcpServer
5
1799 }-
1800 return
executed 994 times by 18 tests: return 0;
Executed by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
0;
executed 994 times by 18 tests: return 0;
Executed by:
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_qeventloop - unknown status
  • tst_qguieventloop - unknown status
  • tst_qhttpsocketengine - unknown status
  • tst_qimagereader - unknown status
  • tst_qlocalsocket - unknown status
  • tst_qobject - unknown status
  • tst_qsocketnotifier - unknown status
  • tst_qsocks5socketengine - unknown status
  • tst_qsslsocket - unknown status
  • tst_qtcpsocket - unknown status
  • tst_qxmlsimplereader - unknown status
994
1801}-
1802-
1803-
1804-
1805-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9