summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_ws.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-01-13 17:47:33 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-01-13 17:47:33 +0300
commit20a9f536e44c3928ad8c3cf7a2959bce557dab8e (patch)
tree0b17f148a4155a1ead90bb106e21b3542f2572e0 /protocols/MSN/src/msn_ws.cpp
parente145db68fb5b7d0682a4b2be0174cebfe47dd74e (diff)
(wiping blood from hands) no more netlib services
Diffstat (limited to 'protocols/MSN/src/msn_ws.cpp')
-rw-r--r--protocols/MSN/src/msn_ws.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/MSN/src/msn_ws.cpp b/protocols/MSN/src/msn_ws.cpp
index 1c7dcd07e9..c82c660e8f 100644
--- a/protocols/MSN/src/msn_ws.cpp
+++ b/protocols/MSN/src/msn_ws.cpp
@@ -31,7 +31,7 @@ int ThreadData::send(const char data[], size_t datalen)
if (proto->usingGateway && !(mType == SERVER_FILETRANS || mType == SERVER_P2P_DIRECT)) {
mGatewayTimeout = 2;
- CallService(MS_NETLIB_SETPOLLINGTIMEOUT, WPARAM(s), mGatewayTimeout);
+ Netlib_SetPollingTimeout(s, mGatewayTimeout);
}
int rlen = Netlib_Send(s, data, (int)datalen);
@@ -113,13 +113,13 @@ int ThreadData::recv(char* data, size_t datalen)
{
if (!proto->usingGateway) {
resetTimeout();
- NETLIBSELECT nls = { 0 };
- nls.cbSize = sizeof(nls);
+
+ NETLIBSELECT nls = {};
nls.dwTimeout = 1000;
nls.hReadConns[0] = s;
for (;;) {
- int ret = CallService(MS_NETLIB_SELECT, 0, (LPARAM)&nls);
+ int ret = Netlib_Select(&nls);
if (ret < 0) {
proto->debugLogA("Connection abortively closed, error %d", WSAGetLastError());
return ret;
@@ -149,13 +149,13 @@ LBL_RecvAgain:
if (sessionClosed || isTimeout()) return 0;
if ((mGatewayTimeout += 2) > 20) mGatewayTimeout = 20;
- CallService(MS_NETLIB_SETPOLLINGTIMEOUT, WPARAM(s), mGatewayTimeout);
+ Netlib_SetPollingTimeout(s, mGatewayTimeout);
goto LBL_RecvAgain;
}
else {
resetTimeout();
mGatewayTimeout = 1;
- CallService(MS_NETLIB_SETPOLLINGTIMEOUT, WPARAM(s), mGatewayTimeout);
+ Netlib_SetPollingTimeout(s, mGatewayTimeout);
}
}