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 | |
parent | e145db68fb5b7d0682a4b2be0174cebfe47dd74e (diff) |
(wiping blood from hands) no more netlib services
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/HTTPServer/src/FileShareNode.cpp | 2 | ||||
-rw-r--r-- | plugins/Ping/src/utils.cpp | 2 | ||||
-rw-r--r-- | plugins/YAMN/src/proto/netlib.cpp | 10 |
3 files changed, 6 insertions, 8 deletions
diff --git a/plugins/HTTPServer/src/FileShareNode.cpp b/plugins/HTTPServer/src/FileShareNode.cpp index 8584df5111..fbc2d43af6 100644 --- a/plugins/HTTPServer/src/FileShareNode.cpp +++ b/plugins/HTTPServer/src/FileShareNode.cpp @@ -83,7 +83,7 @@ CLShareUser::~CLShareUser() void CLShareUser::CloseSocket()
{
- SOCKET s = CallService(MS_NETLIB_GETSOCKET, (WPARAM)hConnection, 0);
+ SOCKET s = Netlib_GetSocket(hConnection);
if (s != INVALID_SOCKET) {
shutdown(s, SD_SEND);
int nBytesRead;
diff --git a/plugins/Ping/src/utils.cpp b/plugins/Ping/src/utils.cpp index 949c8cd1ee..e643b2423a 100644 --- a/plugins/Ping/src/utils.cpp +++ b/plugins/Ping/src/utils.cpp @@ -101,7 +101,7 @@ INT_PTR PluginPing(WPARAM, LPARAM lParam) if (s) {
LINGER l;
char buf[1024];
- SOCKET socket = (SOCKET)CallService(MS_NETLIB_GETSOCKET, (WPARAM)s, (LPARAM)NLOCF_HTTP);
+ SOCKET socket = Netlib_GetSocket(s);
l.l_onoff = 1;
l.l_linger = 0;
setsockopt(socket, SOL_SOCKET, SO_LINGER, (char *)&l, sizeof(l));
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();
|