diff options
author | George Hazan <ghazan@miranda.im> | 2017-01-13 00:01:59 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-01-13 00:01:59 +0300 |
commit | e145db68fb5b7d0682a4b2be0174cebfe47dd74e (patch) | |
tree | c8f9edc907876d236eb16bc8ca8b592accb9846f /protocols/IcqOscarJ/src/icq_direct.cpp | |
parent | 3cb3883908e3168e5f955be3143771721614307a (diff) |
a bit less netlib services
Diffstat (limited to 'protocols/IcqOscarJ/src/icq_direct.cpp')
-rw-r--r-- | protocols/IcqOscarJ/src/icq_direct.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/protocols/IcqOscarJ/src/icq_direct.cpp b/protocols/IcqOscarJ/src/icq_direct.cpp index 59cc9bc35b..d87b215704 100644 --- a/protocols/IcqOscarJ/src/icq_direct.cpp +++ b/protocols/IcqOscarJ/src/icq_direct.cpp @@ -194,9 +194,8 @@ void __cdecl CIcqProto::icq_directThread(directthreadstartinfo *dtsi) {
Thread_SetName("ICQ: directThread");
+ NETLIBPACKETRECVER packetRecv = {};
directconnect dc = { 0 };
- NETLIBPACKETRECVER packetRecv = { 0 };
- HANDLE hPacketRecver;
BOOL bFirstPacket = TRUE;
size_t nSkipPacketBytes = 0;
DWORD dwReqMsgID1 = 0, dwReqMsgID2 = 0;
@@ -333,16 +332,14 @@ void __cdecl CIcqProto::icq_directThread(directthreadstartinfo *dtsi) }
}
- hPacketRecver = (HANDLE)CallService(MS_NETLIB_CREATEPACKETRECVER, (WPARAM)dc.hConnection, 8192);
- packetRecv.cbSize = sizeof(packetRecv);
- packetRecv.bytesUsed = 0;
+ HANDLE hPacketRecver = Netlib_CreatePacketReceiver(dc.hConnection, 8192);
// Packet receiving loop
while (dc.hConnection) {
packetRecv.dwTimeout = dc.wantIdleTime ? 0 : 600000;
- int recvResult = CallService(MS_NETLIB_GETMOREPACKETS, (WPARAM)hPacketRecver, (LPARAM)&packetRecv);
+ int recvResult = Netlib_GetMorePackets(hPacketRecver, &packetRecv);
if (recvResult == 0) {
NetLog_Direct("Clean closure of direct socket (%p)", dc.hConnection);
break;
|