[prev in list] [next in list] [prev in thread] [next in thread]
List: licq-devel
Subject: [Licq-devel] logon problems
From: Dirk Mueller <dmuell () gmx ! net>
Date: 2000-10-17 18:47:02
[Download RAW message or body]
Hi,
as I cannot clearly reproduce the logon problems some people here report it
would be a great gain for me if those people could apply the appended patch.
it adds debug output about the sessionid etc used in logon/logoff packet.
In my experience it happens when you relogon within a short (i.e. less than
a few minutes) time and the new sequence number is smaller than the old one,
however I still cannot see a clear pattern.
Please keep an eye on the additional debug output when you experience logon
problems and keep me posted. thanks.
Dirk
["patch.icqpacket" (text/plain)]
Index: icqpacket.cpp
===================================================================
RCS file: /extra/cvsroot/licq/src/icqpacket.cpp,v
retrieving revision 1.10
diff -u -2 -d -p -b -r1.10 icqpacket.cpp
--- icqpacket.cpp 2000/08/19 07:18:25 1.10
+++ icqpacket.cpp 2000/10/17 18:35:25
@@ -607,4 +607,6 @@ CPU_Logon::CPU_Logon(unsigned short nLoc
m_nSequence = s_nSequence++;
m_nSubSequence = s_nSubSequence++;
+ gLog.Info("%s sessionId: %08lx, sequence: %08lx: subseq: %08lx\n",
+ L_UDPxSTR, m_nSessionId, m_nSequence, m_nSubSequence);
#endif
s_nRealIp = 0;
@@ -756,4 +758,7 @@ CPU_Logoff::CPU_Logoff() : CPacketUdp(IC
InitBuffer();
+ gLog.Info("%s sessionId: %08lx, sequence: %08lx: subseq: %08lx\n",
+ L_UDPxSTR, m_nSessionId, m_nSequence, m_nSubSequence);
+
buffer->PackString("B_USER_DISCONNECTED");
buffer->PackUnsignedShort(0x0005);
@@ -1525,6 +1530,12 @@ CPacketTcp::CPacketTcp(unsigned long _nC
case ICQ_STATUS_AWAY: m_nStatus = ICQ_TCPxACK_AWAY; break;
case ICQ_STATUS_NA: m_nStatus = ICQ_TCPxACK_NA; break;
- case ICQ_STATUS_DND: m_nStatus = ICQ_TCPxACK_DND; break;
- case ICQ_STATUS_OCCUPIED: m_nStatus = ICQ_TCPxACK_OCCUPIED; break;
+ case ICQ_STATUS_DND:
+ m_nStatus = (*user->CustomAutoResponse() && _nSubCommand == ICQ_CMDxTCP_READxDNDxMSG)
+ ? ICQ_TCPxACK_DNDxCAR : ICQ_TCPxACK_DND;
+ break;
+ case ICQ_STATUS_OCCUPIED:
+ m_nStatus = (*user->CustomAutoResponse() && _nSubCommand == ICQ_CMDxTCP_READxOCCUPIEDxMSG)
+ ? ICQ_TCPxACK_OCCUPIEDxCAR : ICQ_TCPxACK_OCCUPIED;
+ break;
case ICQ_STATUS_ONLINE:
case ICQ_STATUS_FREEFORCHAT:
@@ -1840,18 +1851,16 @@ CPT_Ack::CPT_Ack(unsigned short _nSubCom
ICQOwner *o = gUserManager.FetchOwner(LOCK_R);
+ // don't sent out AutoResponse if we're online
+ // it could contain stuff the other site shouldn't be able to read
+ // also some clients always pop up the auto response
+ // window when they receive one, annoying for them..
if(((pUser->StatusToUser() != ICQ_STATUS_OFFLINE &&
pUser->StatusToUser() != ICQ_STATUS_ONLINE) ?
pUser->StatusToUser() : o->Status()) != ICQ_STATUS_ONLINE)
{
- if (pUser->CustomAutoResponse()[0] != '\0')
+ if (*pUser->CustomAutoResponse())
{
- char *cus = (char *)malloc(strlen(pUser->CustomAutoResponse()) + 512);
- char *def = (char *)malloc(strlen(o->AutoResponse()) + 512);
- pUser->usprintf(def, o->AutoResponse(), USPRINTF_NTORN);
- pUser->usprintf(cus, pUser->CustomAutoResponse(), USPRINTF_NTORN);
- m_szMessage = (char *)malloc(strlen(cus) + strlen(def) + 60);
- sprintf(m_szMessage, "%s\r\n--------------------\r\n%s", def, cus);
- free(cus);
- free(def);
+ m_szMessage = (char *)malloc(strlen(pUser->CustomAutoResponse()) + 512);
+ pUser->usprintf(m_szMessage, pUser->CustomAutoResponse(), USPRINTF_NTORN);
}
else
@@ -1862,11 +1871,5 @@ CPT_Ack::CPT_Ack(unsigned short _nSubCom
}
else
- {
- // don't sent out AutoResponse if we're online
- // it could contain stuff the other site shouldn't read
- // also some clients always pop up the auto response
- // window when they receive one, annoying for them..
m_szMessage = strdup("");
- }
gUserManager.DropOwner();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic