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 /protocols/AimOscar | |
parent | e145db68fb5b7d0682a4b2be0174cebfe47dd74e (diff) |
(wiping blood from hands) no more netlib services
Diffstat (limited to 'protocols/AimOscar')
-rwxr-xr-x | protocols/AimOscar/src/client.cpp | 4 | ||||
-rwxr-xr-x | protocols/AimOscar/src/connection.cpp | 5 | ||||
-rw-r--r-- | protocols/AimOscar/src/direct_connect.cpp | 4 | ||||
-rw-r--r-- | protocols/AimOscar/src/file.cpp | 4 |
4 files changed, 7 insertions, 10 deletions
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;
}
|