From 20a9f536e44c3928ad8c3cf7a2959bce557dab8e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 13 Jan 2017 17:47:33 +0300 Subject: (wiping blood from hands) no more netlib services --- plugins/YAMN/src/proto/netlib.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'plugins/YAMN') diff --git a/plugins/YAMN/src/proto/netlib.cpp b/plugins/YAMN/src/proto/netlib.cpp index b6405b7e90..64da34ed8d 100644 --- a/plugins/YAMN/src/proto/netlib.cpp +++ b/plugins/YAMN/src/proto/netlib.cpp @@ -62,12 +62,12 @@ void CNLClient::SSLify() throw(DWORD) #ifdef DEBUG_COMM SSL_DebugLog("Staring SSL..."); #endif - int socket = CallService(MS_NETLIB_GETSOCKET, (WPARAM)hConnection, 0); + int socket = Netlib_GetSocket(hConnection); if (socket != INVALID_SOCKET) { #ifdef DEBUG_COMM SSL_DebugLog("Staring netlib core SSL"); #endif - if (CallService(MS_NETLIB_STARTSSL, (WPARAM)hConnection, 0)) { + if (Netlib_StartSsl(hConnection, NULL)) { #ifdef DEBUG_COMM SSL_DebugLog("Netlib core SSL started"); #endif @@ -180,12 +180,10 @@ char* CNLClient::Recv(char *buf, int buflen) throw(DWORD) throw NetworkError = (DWORD)ENL_RECVALLOC; if (!isTLSed) { - NETLIBSELECT nls; - memset(&nls, 0, sizeof(NETLIBSELECT)); - nls.cbSize = sizeof(NETLIBSELECT); + NETLIBSELECT nls = {}; nls.dwTimeout = 60000; nls.hReadConns[0] = hConnection; - switch (CallService(MS_NETLIB_SELECT, 0, (LPARAM)&nls)) { + switch (Netlib_Select(&nls)) { case SOCKET_ERROR: free(buf); SystemError = WSAGetLastError(); -- cgit v1.2.3