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 --- protocols/IcqOscarJ/src/chan_04close.cpp | 2 +- protocols/IcqOscarJ/src/fam_01service.cpp | 4 ++-- protocols/IcqOscarJ/src/icq_http.cpp | 6 ++---- protocols/IcqOscarJ/src/icq_server.cpp | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) (limited to 'protocols/IcqOscarJ') diff --git a/protocols/IcqOscarJ/src/chan_04close.cpp b/protocols/IcqOscarJ/src/chan_04close.cpp index 315b22c888..cc7ea7de46 100644 --- a/protocols/IcqOscarJ/src/chan_04close.cpp +++ b/protocols/IcqOscarJ/src/chan_04close.cpp @@ -137,7 +137,7 @@ int CIcqProto::connectNewServer(serverthread_info *info) hServerConn = NetLib_OpenConnection(m_hNetlibUser, NULL, &nloc); if (hServerConn && info->newServerSSL) /* Start SSL session if requested */ - if (!CallService(MS_NETLIB_STARTSSL, (WPARAM)hServerConn, 0)) + if (!Netlib_StartSsl(hServerConn, NULL)) NetLib_CloseConnection(&hServerConn, FALSE); if (hServerConn) { diff --git a/protocols/IcqOscarJ/src/fam_01service.cpp b/protocols/IcqOscarJ/src/fam_01service.cpp index a416b1b97a..72640bb168 100644 --- a/protocols/IcqOscarJ/src/fam_01service.cpp +++ b/protocols/IcqOscarJ/src/fam_01service.cpp @@ -369,9 +369,9 @@ void CIcqProto::handleServiceFam(BYTE *pBuffer, size_t wBufferLength, snac_heade debugLogA("Unable to connect to ICQ new family server."); // we want the handler to be called even if the connecting failed else if (bServerSSL) { /* Start SSL session if requested */ - debugLogA("(%p) Starting SSL negotiation", CallService(MS_NETLIB_GETSOCKET, (WPARAM)hConnection, 0)); + debugLogA("(%p) Starting SSL negotiation", Netlib_GetSocket(hConnection)); - if (!CallService(MS_NETLIB_STARTSSL, (WPARAM)hConnection, 0)) { + if (!Netlib_StartSsl(hConnection, NULL)) { debugLogA("Unable to connect to ICQ new family server, SSL could not be negotiated"); NetLib_CloseConnection(&hConnection, FALSE); } diff --git a/protocols/IcqOscarJ/src/icq_http.cpp b/protocols/IcqOscarJ/src/icq_http.cpp index d9a8e5378a..20d63bf75d 100644 --- a/protocols/IcqOscarJ/src/icq_http.cpp +++ b/protocols/IcqOscarJ/src/icq_http.cpp @@ -37,7 +37,6 @@ int icq_httpGatewayInit(HANDLE hConn, NETLIBOPENCONNECTION*, NETLIBHTTPREQUEST * DWORD dwSid1, dwSid2, dwSid3, dwSid4; BYTE *buf; char szSid[33], szHttpServer[256], szHttpGetUrl[300], szHttpPostUrl[300]; - NETLIBHTTPPROXYINFO nlhpi = {0}; if (nlhr->dataLength < 31) { @@ -68,15 +67,14 @@ int icq_httpGatewayInit(HANDLE hConn, NETLIBOPENCONNECTION*, NETLIBHTTPREQUEST * memcpy(szHttpServer, buf, wIpLen); szHttpServer[wIpLen] = '\0'; - nlhpi.cbSize = sizeof(nlhpi); + NETLIBHTTPPROXYINFO nlhpi = {}; nlhpi.flags = NLHPIF_USEPOSTSEQUENCE; nlhpi.szHttpGetUrl = szHttpGetUrl; nlhpi.szHttpPostUrl = szHttpPostUrl; nlhpi.firstPostSequence = 1; mir_snprintf(szHttpGetUrl, "http://%s/monitor?sid=%s", szHttpServer, szSid); mir_snprintf(szHttpPostUrl, "http://%s/data?sid=%s&seq=", szHttpServer, szSid); - - return CallService(MS_NETLIB_SETHTTPPROXYINFO, (WPARAM)hConn, (LPARAM)&nlhpi); + return Netlib_SetHttpProxyInfo(hConn, &nlhpi); } diff --git a/protocols/IcqOscarJ/src/icq_server.cpp b/protocols/IcqOscarJ/src/icq_server.cpp index 1de0a261e5..732c251ec3 100644 --- a/protocols/IcqOscarJ/src/icq_server.cpp +++ b/protocols/IcqOscarJ/src/icq_server.cpp @@ -63,7 +63,7 @@ void __cdecl CIcqProto::ServerThread(serverthread_start_info *infoParam) SAFE_FREE((void**)&infoParam); if (hServerConn && m_bSecureConnection) { - if (!CallService(MS_NETLIB_STARTSSL, (WPARAM)hServerConn, 0)) { + if (!Netlib_StartSsl(hServerConn, 0)) { icq_LogMessage(LOG_ERROR, LPGEN("Unable to connect to ICQ login server, SSL could not be negotiated")); SetCurrentStatus(ID_STATUS_OFFLINE); NetLib_CloseConnection(&hServerConn, TRUE); -- cgit v1.2.3