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/AimOscar/src/client.cpp | 4 ++-- protocols/AimOscar/src/connection.cpp | 5 +---- protocols/AimOscar/src/direct_connect.cpp | 4 ++-- protocols/AimOscar/src/file.cpp | 4 ++-- 4 files changed, 7 insertions(+), 10 deletions(-) (limited to 'protocols/AimOscar/src') diff --git a/protocols/AimOscar/src/client.cpp b/protocols/AimOscar/src/client.cpp index d428154a0a..839698bb96 100755 --- a/protocols/AimOscar/src/client.cpp +++ b/protocols/AimOscar/src/client.cpp @@ -255,8 +255,8 @@ int CAimProto::aim_client_ready(HANDLE hServerConn, unsigned short &seqno) { unsigned short offset = 0; - NETLIBCONNINFO connInfo = { sizeof(connInfo) }; - CallService(MS_NETLIB_GETCONNECTIONINFO, (WPARAM)hServerConn, (LPARAM)&connInfo); + NETLIBCONNINFO connInfo = {}; + Netlib_GetConnectionInfo(hServerConn, &connInfo); m_internal_ip = connInfo.dwIpv4; diff --git a/protocols/AimOscar/src/connection.cpp b/protocols/AimOscar/src/connection.cpp index a3635cdcfc..03b51e2577 100755 --- a/protocols/AimOscar/src/connection.cpp +++ b/protocols/AimOscar/src/connection.cpp @@ -30,10 +30,7 @@ HANDLE CAimProto::aim_connect(const char* server, unsigned short port, bool use_ debugLogA("%s:%u", server, port); HANDLE con = Netlib_OpenConnection(m_hNetlibUser, &ncon); if (con && use_ssl) { - NETLIBSSL ssl = { 0 }; - ssl.cbSize = sizeof(ssl); - ssl.host = host; - if (!CallService(MS_NETLIB_STARTSSL, (WPARAM)con, (LPARAM)&ssl)) { + if (!Netlib_StartSsl(con, host)) { Netlib_CloseHandle(con); con = NULL; } diff --git a/protocols/AimOscar/src/direct_connect.cpp b/protocols/AimOscar/src/direct_connect.cpp index 2b4bcb9366..6f9eecf76b 100644 --- a/protocols/AimOscar/src/direct_connect.cpp +++ b/protocols/AimOscar/src/direct_connect.cpp @@ -65,8 +65,8 @@ void aim_direct_connection_initiated(HANDLE hNewConnection, DWORD, void* extra)/ { CAimProto *ppro = (CAimProto*)extra; - NETLIBCONNINFO connInfo = { sizeof(connInfo) }; - CallService(MS_NETLIB_GETCONNECTIONINFO, (WPARAM)hNewConnection, (LPARAM)&connInfo); + NETLIBCONNINFO connInfo = {}; + Netlib_GetConnectionInfo(hNewConnection, &connInfo); ppro->debugLogA("Buddy connected: %s", connInfo.szIpPort); diff --git a/protocols/AimOscar/src/file.cpp b/protocols/AimOscar/src/file.cpp index cdb81e03b6..42c2ae2b8d 100644 --- a/protocols/AimOscar/src/file.cpp +++ b/protocols/AimOscar/src/file.cpp @@ -186,7 +186,6 @@ int CAimProto::sending_file(file_transfer *ft, HANDLE hServerPacketRecver, NETLI if (ft->pfts.currentFileProgress) _lseeki64(fid, ft->pfts.currentFileProgress, SEEK_SET); NETLIBSELECT tSelect = { 0 }; - tSelect.cbSize = sizeof(tSelect); tSelect.hReadConns[0] = ft->hConn; ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM)&ft->pfts); @@ -203,7 +202,8 @@ int CAimProto::sending_file(file_transfer *ft, HANDLE hServerPacketRecver, NETLI if (clock() >= lNotify) { ProtoBroadcastAck(ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM)&ft->pfts); - if (CallService(MS_NETLIB_SELECT, 0, (LPARAM)&tSelect)) break; + if (Netlib_Select(&tSelect)) + break; lNotify = clock() + 500; } -- cgit v1.2.3