summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_threads.cpp
diff options
context:
space:
mode:
authorPiotr Piastucki <leech.miranda@gmail.com>2015-09-26 12:42:01 +0000
committerPiotr Piastucki <leech.miranda@gmail.com>2015-09-26 12:42:01 +0000
commit6ea19ec892b3b1f89ff8fc23e002839cf3bc66d3 (patch)
tree27808e6f65c082dfb1c814eb87b93cfc0b13ee75 /protocols/MSN/src/msn_threads.cpp
parent526422ad0d6a038125013ae7e41c7baa8d6fbfd4 (diff)
MSN: Fixed ping so that registration hopefully doesn't timeout anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@15448 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_threads.cpp')
-rw-r--r--protocols/MSN/src/msn_threads.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/protocols/MSN/src/msn_threads.cpp b/protocols/MSN/src/msn_threads.cpp
index 4cd7eb197a..e72575e1fb 100644
--- a/protocols/MSN/src/msn_threads.cpp
+++ b/protocols/MSN/src/msn_threads.cpp
@@ -42,7 +42,9 @@ void __cdecl CMsnProto::msn_keepAliveThread(void*)
msnPingTimeout = 45;
else {
msnPingTimeout = 20;
- keepFlag = keepFlag && msnNsThread->sendPacket("PNG", "CON 0");
+ keepFlag = keepFlag && (lastMsgId?msnNsThread->sendPacketPayload("PNG", "CON", "\bLast-Msg-Id: %I64u\r\n\r\n", lastMsgId):
+ (msnRegistration?msnNsThread->sendPacketPayload("PNG", "CON", "\b\r\n"):
+ msnNsThread->sendPacket("PNG", "CON 0")));
}
#ifdef OBSOLETE
p2p_clearDormantSessions();