summaryrefslogtreecommitdiff
path: root/protocols/MRA/src/Mra_proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-04-29 21:37:57 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-04-29 21:37:57 +0000
commit6571a527400a6b5efc787305f57f3052abd1e761 (patch)
tree8d71858a96d17685d4465ae714e41c34cf4f50ed /protocols/MRA/src/Mra_proto.cpp
parent897e185e8b01f4798c685de0ea8226931400b2ec (diff)
unified project for MRA protocol
git-svn-id: http://svn.miranda-ng.org/main/trunk@13260 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/src/Mra_proto.cpp')
-rw-r--r--protocols/MRA/src/Mra_proto.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp
index 7951ea777c..53fa0e572b 100644
--- a/protocols/MRA/src/Mra_proto.cpp
+++ b/protocols/MRA/src/Mra_proto.cpp
@@ -1,4 +1,4 @@
-#include "Mra.h"
+#include "stdafx.h"
#include "MraOfflineMsg.h"
#include "MraRTFMsg.h"
#include "MraPlaces.h"
@@ -156,7 +156,7 @@ DWORD CMraProto::MraGetNLBData(CMStringA &szHost, WORD *pwPort)
bContinue = FALSE;
break;
case 1:
- dwBytesReceived = Netlib_Recv(nls.hReadConns[0], (LPSTR)(btBuff + dwRcvBuffSizeUsed), (SIZEOF(btBuff) - dwRcvBuffSizeUsed), 0);
+ dwBytesReceived = Netlib_Recv(nls.hReadConns[0], (LPSTR)(btBuff + dwRcvBuffSizeUsed), (int)(SIZEOF(btBuff) - dwRcvBuffSizeUsed), 0);
if (dwBytesReceived && dwBytesReceived != SOCKET_ERROR)
dwRcvBuffSizeUsed += dwBytesReceived;
else
@@ -270,7 +270,7 @@ DWORD CMraProto::MraNetworkDispatcher()
lpbBufferRcv = (LPBYTE)mir_realloc(lpbBufferRcv, dwRcvBuffSize);
}
- DWORD dwBytesReceived = Netlib_Recv(nls.hReadConns[0], (LPSTR)(lpbBufferRcv + dwRcvBuffSizeUsed), (dwRcvBuffSize - dwRcvBuffSizeUsed), 0);
+ DWORD dwBytesReceived = Netlib_Recv(nls.hReadConns[0], (LPSTR)(lpbBufferRcv + dwRcvBuffSizeUsed), (int)(dwRcvBuffSize - dwRcvBuffSizeUsed), 0);
if ( !dwBytesReceived || dwBytesReceived == SOCKET_ERROR) { // disconnected
if (m_iStatus != ID_STATUS_OFFLINE) {
dwRetErrorCode = GetLastError();
@@ -281,8 +281,8 @@ DWORD CMraProto::MraNetworkDispatcher()
dwRcvBuffSizeUsed += dwBytesReceived;
while (TRUE) {
- dwDataCurrentBuffSize = (dwRcvBuffSize - dwDataCurrentBuffOffset);
- dwDataCurrentBuffSizeUsed = (dwRcvBuffSizeUsed - dwDataCurrentBuffOffset);
+ dwDataCurrentBuffSize = (int)(dwRcvBuffSize - dwDataCurrentBuffOffset);
+ dwDataCurrentBuffSizeUsed = (int)(dwRcvBuffSizeUsed - dwDataCurrentBuffOffset);
pmaHeader = (mrim_packet_header_t*)(lpbBufferRcv + dwDataCurrentBuffOffset);
// packet header received
@@ -1604,7 +1604,7 @@ DWORD CMraProto::MraRecvCommand_Message(DWORD dwTime, DWORD dwFlags, CMStringA &
if (lpbRTFData) {
unsigned dwCompressedSize;
mir_ptr<BYTE> lpbCompressed((LPBYTE)mir_base64_decode(plpsRFTText, &dwCompressedSize));
- DWORD dwRTFDataSize = dwRFTBuffSize;
+ DWORD dwRTFDataSize = (DWORD)dwRFTBuffSize;
if (uncompress(lpbRTFData, &dwRTFDataSize, lpbCompressed, dwCompressedSize) == Z_OK) {
BinBuffer buf(lpbRTFData, dwRTFDataSize);
@@ -1814,7 +1814,7 @@ DWORD CMraProto::MraRecvCommand_Message(DWORD dwTime, DWORD dwFlags, CMStringA &
DWORD GetMraXStatusIDFromMraUriStatus(const char *szStatusUri)
{
if (szStatusUri)
- for (size_t i = 0; lpcszStatusUri[i]; i++)
+ for (DWORD i = 0; lpcszStatusUri[i]; i++)
if (!_stricmp(lpcszStatusUri[i], szStatusUri))
return i;