Blog: Login Issues for Russian users: licq-1.3.6-rulogin.patch
| File licq-1.3.6-rulogin.patch, 1.7 kB (added by flynd, 14 months ago) |
|---|
-
src/icqpacket.cpp
134 134 }; 135 135 #endif 136 136 137 static unsigned short login_fix [] = { 138 5695, 23595, 23620, 23049, 0x2886, 0x2493, 23620, 23049, 2853, 17372, 1255, 1796, 1657, 13606, 1930, 23918, 31234, 30120, 0x1BEA, 0x5342, 0x30CC, 0x2294, 0x5697, 0x25FA, 0x3303, 0x078A, 0x0FC5, 0x25D6, 0x26EE,0x7570, 0x7F33, 0x4E94, 0x07C9, 0x7339, 0x42A8 139 }; 140 137 141 void Encrypt_Server(CBuffer* /* buffer */) 138 142 { 139 143 #if ICQ_VERSION == 2 … … 274 278 275 279 //======Server TCP============================================================ 276 280 bool CSrvPacketTcp::s_bRegistered = false; 277 unsigned short CSrvPacketTcp::s_nSequence[32] = { 0 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,278 0 , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};281 unsigned short CSrvPacketTcp::s_nSequence[32] = { 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 282 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }; 279 283 unsigned short CSrvPacketTcp::s_nSubSequence = 0; 280 284 pthread_mutex_t CSrvPacketTcp::s_xMutex = PTHREAD_MUTEX_INITIALIZER; 281 285 … … 310 314 { 311 315 pthread_mutex_lock(&s_xMutex); 312 316 if (s_nSequence[m_nService] == 0xffff) 313 s_nSequence[m_nService] = rand() & 0x7fff;317 s_nSequence[m_nService] = login_fix[ rand() % (sizeof(login_fix)/sizeof(login_fix[0])-1) ]; 314 318 m_nSequence = s_nSequence[m_nService]++; 315 319 s_nSequence[m_nService] &= 0x7fff; 316 320 pthread_mutex_unlock(&s_xMutex);
