diff options
author | George Hazan <ghazan@miranda.im> | 2017-01-13 17:47:33 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-01-13 17:47:33 +0300 |
commit | 20a9f536e44c3928ad8c3cf7a2959bce557dab8e (patch) | |
tree | 0b17f148a4155a1ead90bb106e21b3542f2572e0 /plugins/YAMN/src | |
parent | e145db68fb5b7d0682a4b2be0174cebfe47dd74e (diff) |
(wiping blood from hands) no more netlib services
Diffstat (limited to 'plugins/YAMN/src')
-rw-r--r-- | plugins/YAMN/src/proto/netlib.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
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();
|