[prev in list] [next in list] [prev in thread] [next in thread] 

List:       licq-cvs
Subject:    [Licq-cvs] r4375 - trunk/licq/src
From:       emostar () users ! sourceforge ! net
Date:       2006-02-16 15:17:50
Message-ID: 20060216151750.16994.qmail () mail ! thejon ! org
[Download RAW message or body]

Author: emostar
Date: 2006-02-17 00:17:49 +0900 (Fri, 17 Feb 2006)
New Revision: 4375

Modified:
   trunk/licq/src/icqd-srv.cpp
Log:
Fix the problem of users being logged off, but they are still online.
The offline packet contains some extra stuff at the end, if it has a tlv (0x0000, \
0x0002) then they are still online.. no idea why though. but i tested it for a week. \
AIM users send this when they log offline... icq5 (lite?) users send a tlv(0x0000, \
0x00001) when they logoff.. but this ?\194?\168fake?\194?\168 logoff is a bit \
strange.. i?\194?\180ll keep my eyes on it.


Modified: trunk/licq/src/icqd-srv.cpp
===================================================================
--- trunk/licq/src/icqd-srv.cpp	2006-02-16 10:32:52 UTC (rev 4374)
+++ trunk/licq/src/icqd-srv.cpp	2006-02-16 15:17:49 UTC (rev 4375)
@@ -2853,11 +2853,28 @@
     unsigned long junk1;
     unsigned short junk2;
     char *szId;
+    bool bFake = false;
 
     junk1 = packet.UnpackUnsignedLongBE();
     junk2 = packet.UnpackUnsignedShortBE();
     szId = packet.UnpackUserString();
 
+    if (packet.readTLV())
+    {
+      if (packet.hasTLV(0x0000) && packet.getTLVLen(0x0000) == 2)
+        bFake = true;
+    }
+
+    // AIM users send this when they really do go offline, so skip it if it is
+    // an AIM user
+    if (bFake && isdigit(szId[0]))
+    {
+      gLog.Info("%sIgnoring fake offline:%s\n", L_SRVxSTR, szId);
+      delete [] szId;
+      break;
+    }
+
+
     ICQUser *u = gUserManager.FetchUser(szId, LICQ_PPID, LOCK_W);
     if (u == NULL)
     {



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Licq-cvs mailing list
Licq-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/licq-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic