summaryrefslogtreecommitdiffstats
path: root/tests/manual/network_stresstest/tst_network_stresstest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/network_stresstest/tst_network_stresstest.cpp')
-rw-r--r--tests/manual/network_stresstest/tst_network_stresstest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/manual/network_stresstest/tst_network_stresstest.cpp b/tests/manual/network_stresstest/tst_network_stresstest.cpp
index 0f2673e23c..74237ea9cc 100644
--- a/tests/manual/network_stresstest/tst_network_stresstest.cpp
+++ b/tests/manual/network_stresstest/tst_network_stresstest.cpp
@@ -338,13 +338,13 @@ void tst_NetworkStressTest::nativeNonBlockingConnectDisconnect()
QVERIFY(fd != INVALID_SOCKET);
// set the socket to non-blocking and start connecting
- unsigned long buf = v;
+ unsigned long buf = 0;
unsigned long outBuf;
DWORD sizeWritten = 0;
QVERIFY(::WSAIoctl(fd, FIONBIO, &buf, sizeof(unsigned long), &outBuf, sizeof(unsigned long), &sizeWritten, 0,0) != SOCKET_ERROR);
while (true) {
- int connectResult = ::WSAConnect(fd, sockAddrPtr, sockAddrSize, 0,0,0,0);
+ int connectResult = ::WSAConnect(fd, (sockaddr *)addr.data(), addr.size(), 0,0,0,0);
if (connectResult == 0 || WSAGetLastError() == WSAEISCONN) {
break; // connected
} else {
@@ -537,7 +537,7 @@ void tst_NetworkStressTest::blockingMultipleRequests()
qWarning() << "no content-length:" << QString(buffer);
break;
}
- pos += strlen("\r\ncontent-length: ");
+ pos += int(strlen("\r\ncontent-length: "));
int eol = buffer.indexOf("\r\n", pos + 2);
if (eol == -1) {