diff options
author | George Hazan <george.hazan@gmail.com> | 2014-07-12 16:22:27 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-07-12 16:22:27 +0000 |
commit | 8f57f4e8597c8eae88c1e869aa51188e67788142 (patch) | |
tree | 84b2bc0b9276b247f5d234c6b1a1c56279830629 /protocols/IcqOscarJ/src/chan_01login.cpp | |
parent | c1d0bec52e19d51117b05d3f7d80a366df657817 (diff) |
- keep-alive thread removed;
- boolean variables obtained type bool
git-svn-id: http://svn.miranda-ng.org/main/trunk@9775 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src/chan_01login.cpp')
-rw-r--r-- | protocols/IcqOscarJ/src/chan_01login.cpp | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/protocols/IcqOscarJ/src/chan_01login.cpp b/protocols/IcqOscarJ/src/chan_01login.cpp index a0e1222aa4..fdd905258d 100644 --- a/protocols/IcqOscarJ/src/chan_01login.cpp +++ b/protocols/IcqOscarJ/src/chan_01login.cpp @@ -33,13 +33,8 @@ void CIcqProto::handleLoginChannel(BYTE *buf, WORD datalen, serverthread_info *i #endif
// isLoginServer is "1" if we just received SRV_HELLO
- if (info->isLoginServer)
- {
- if (m_bSecureLogin)
- {
- char szUin[UINMAXLEN];
- WORD wUinLen;
-
+ if (info->isLoginServer) {
+ if (m_bSecureLogin) {
#ifdef _DEBUG
debugLogA("Sending %s to %s", "CLI_HELLO", "login server");
#endif
@@ -49,35 +44,32 @@ void CIcqProto::handleLoginChannel(BYTE *buf, WORD datalen, serverthread_info *i packTLVDWord(&packet, 0x8003, 0x00100000); // unknown
sendServPacket(&packet); // greet login server
- wUinLen = strlennull(strUID(m_dwLocalUIN, szUin));
+ char szUin[UINMAXLEN];
+ WORD wUinLen = strlennull(strUID(m_dwLocalUIN, szUin));
+
#ifdef _DEBUG
debugLogA("Sending %s to %s", "ICQ_SIGNON_AUTH_REQUEST", "login server");
#endif
-
serverPacketInit(&packet, (WORD)(14 + wUinLen));
packFNACHeader(&packet, ICQ_AUTHORIZATION_FAMILY, ICQ_SIGNON_AUTH_REQUEST, 0, 0);
packTLV(&packet, 0x0001, wUinLen, (LPBYTE)szUin);
sendServPacket(&packet); // request login digest
}
- else
- {
+ else {
sendClientAuth((char*)info->szAuthKey, info->wAuthKeyLen, FALSE);
#ifdef _DEBUG
debugLogA("Sent CLI_IDENT to %s", "login server");
#endif
}
- info->isLoginServer = 0;
- if (info->cookieDataLen)
- {
+ info->isLoginServer = false;
+ if (info->cookieDataLen) {
SAFE_FREE((void**)&info->cookieData);
info->cookieDataLen = 0;
}
}
- else
- {
- if (info->cookieDataLen)
- {
+ else {
+ if (info->cookieDataLen) {
wLocalSequence = generate_flap_sequence();
serverCookieInit(&packet, info->cookieData, (WORD)info->cookieDataLen);
@@ -90,10 +82,7 @@ void CIcqProto::handleLoginChannel(BYTE *buf, WORD datalen, serverthread_info *i SAFE_FREE((void**)&info->cookieData);
info->cookieDataLen = 0;
}
- else
- {
- // We need a cookie to identify us to the communication server
+ else // We need a cookie to identify us to the communication server
debugLogA("Error: Connected to %s without a cookie!", "communication server");
- }
}
}
|