summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorPiotr Piastucki <leech.miranda@gmail.com>2015-11-06 10:00:05 +0000
committerPiotr Piastucki <leech.miranda@gmail.com>2015-11-06 10:00:05 +0000
commitd989b542b674ee20ad94b43e8781197d3fca28ab (patch)
tree4cd743bf0e5031375fa8ee4db7003b9991c710d3 /protocols
parent4d20a570abd72490d7a230e5dfcb355ef4f4510a (diff)
Thanks for breaking MSN with "minor cleanup", let's see if you find out what you did wrong here ;)
git-svn-id: http://svn.miranda-ng.org/main/trunk@15689 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/MSN/src/msn_threads.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/protocols/MSN/src/msn_threads.cpp b/protocols/MSN/src/msn_threads.cpp
index e2851c4220..8e92e2e72e 100644
--- a/protocols/MSN/src/msn_threads.cpp
+++ b/protocols/MSN/src/msn_threads.cpp
@@ -23,7 +23,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
#include "msn_proto.h"
+/////////////////////////////////////////////////////////////////////////////////////////
// Keep-alive thread for the main connection
+
void __cdecl CMsnProto::msn_keepAliveThread(void*)
{
bool keepFlag = true;
@@ -87,6 +89,8 @@ void __cdecl CMsnProto::msn_refreshOAuthThread(void *param)
MSN_SendATH((ThreadData*)param);
}
}
+/////////////////////////////////////////////////////////////////////////////////////////
+// MSN server thread - read and process commands from a server
static bool ReallocInfoBuffer(ThreadData *info, size_t mDataSize)
{
@@ -100,7 +104,6 @@ static bool ReallocInfoBuffer(ThreadData *info, size_t mDataSize)
return true;
}
-// MSN server thread - read and process commands from a server
void __cdecl CMsnProto::MSNServerThread(void* arg)
{
ThreadData* info = (ThreadData*)arg;
@@ -541,15 +544,14 @@ ThreadData* CMsnProto::MSN_GetThreadByPort(WORD wPort)
/////////////////////////////////////////////////////////////////////////////////////////
// class ThreadData members
-ThreadData::ThreadData() : mDataSize(8192), mGatewayTimeout(2), mFunc(0), mIncomingBoundPort(0), mIncomingPort(0),
- mIsMainThread(false), sessionClosed(false), mBridgeInit(false), gatewayType(false), termPending(false), firstMsgRecv(false),
- mTrid(0), mBytesInData(0), mMsnFtp(0), mCaller(0), mTimerId(0), proto(0), s(0)
+
+ThreadData::ThreadData()
{
memset(&mInitialContactWLID, 0, sizeof(ThreadData) - 2 * sizeof(STRLIST));
-
+ mGatewayTimeout = 2;
resetTimeout();
hWaitEvent = CreateSemaphore(NULL, 0, MSN_PACKETS_COMBINE, NULL);
- mData = (char*)mir_calloc(mDataSize + 1);
+ mData = (char*)mir_calloc((mDataSize=8192)+1);
}
ThreadData::~ThreadData()
@@ -752,7 +754,9 @@ BYTE* HReadBuffer::surelyRead(size_t parBytes)
/////////////////////////////////////////////////////////////////////////////////////////
// class GCThreadData members
-GCThreadData::GCThreadData() : mJoinedContacts(10, PtrKeySortT), mMe(0), netId(0)
+
+GCThreadData::GCThreadData() :
+mJoinedContacts(10, PtrKeySortT)
{
memset(&mCreator, 0, sizeof(GCThreadData) - sizeof(mJoinedContacts));
}