diff options
author | George Hazan <ghazan@miranda.im> | 2022-05-07 15:00:02 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-05-07 15:00:02 +0300 |
commit | c4ffab658f422e84259a0a9769f0003b33a013bd (patch) | |
tree | 667448a4911b47f72acbb82a0142e13ddefb3b6d /protocols/JabberG/src/jabber_zstream.cpp | |
parent | fd1ca33248519ee530d1d05c6a451c9c63bf4e8a (diff) |
Netlib_OpenConnection - finally old stupid structure NETLIBOPENCONNECTION died and converted into a set of parameters + code cleaning
Diffstat (limited to 'protocols/JabberG/src/jabber_zstream.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_zstream.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber_zstream.cpp b/protocols/JabberG/src/jabber_zstream.cpp index ec3a7ca3b7..0931e4fc34 100644 --- a/protocols/JabberG/src/jabber_zstream.cpp +++ b/protocols/JabberG/src/jabber_zstream.cpp @@ -72,7 +72,7 @@ int ThreadData::zlibSend(char* data, int datalen) }
int send_datalen = ZLIB_CHUNK_SIZE - zStreamOut.avail_out;
- int len = proto->WsSend(s, send_data, send_datalen, MSG_NODUMP);
+ int len = Netlib_Send(s, send_data, send_datalen, MSG_NODUMP);
if (len == SOCKET_ERROR || len != send_datalen) {
proto->debugLogA("Netlib_Send() failed, error=%d", WSAGetLastError());
return SOCKET_ERROR;
@@ -92,13 +92,15 @@ int ThreadData::zlibRecv(char* data, long datalen) {
if (zRecvReady) {
retry:
- zRecvDatalen = proto->WsRecv(s, zRecvData, ZLIB_CHUNK_SIZE, MSG_NODUMP);
+ zRecvDatalen = Netlib_Recv(s, zRecvData, ZLIB_CHUNK_SIZE, MSG_NODUMP);
if (zRecvDatalen == SOCKET_ERROR) {
proto->debugLogA("Netlib_Recv() failed, error=%d", WSAGetLastError());
return SOCKET_ERROR;
}
- if (zRecvDatalen == 0)
+ if (zRecvDatalen == 0) {
+ proto->debugLogA("Connection closed gracefully");
return 0;
+ }
zStreamIn.avail_in = zRecvDatalen;
zStreamIn.next_in = (Bytef*)zRecvData;
|