libpurple/protocols/oscar/family_auth.c

changeset 18341
8990ff4ec97c
parent 17443
bae8548d98b3
child 19820
0f82885da3d8
equal deleted inserted replaced
18340:72716c465b68 18341:8990ff4ec97c
209 if (!ci || !sn || !password) 209 if (!ci || !sn || !password)
210 return -EINVAL; 210 return -EINVAL;
211 211
212 #ifdef USE_XOR_FOR_ICQ 212 #ifdef USE_XOR_FOR_ICQ
213 /* If we're signing on an ICQ account then use the older, XOR login method */ 213 /* If we're signing on an ICQ account then use the older, XOR login method */
214 if (isdigit(sn[0])) 214 if (aim_sn_is_icq(sn))
215 return goddamnicq2(od, conn, sn, password, ci); 215 return goddamnicq2(od, conn, sn, password, ci);
216 #endif 216 #endif
217 217
218 frame = flap_frame_new(od, 0x02, 1152); 218 frame = flap_frame_new(od, 0x02, 1152);
219 219
222 222
223 aim_tlvlist_add_str(&tlvlist, 0x0001, sn); 223 aim_tlvlist_add_str(&tlvlist, 0x0001, sn);
224 224
225 /* Truncate ICQ and AOL passwords, if necessary */ 225 /* Truncate ICQ and AOL passwords, if necessary */
226 password_len = strlen(password); 226 password_len = strlen(password);
227 if (isdigit(sn[0]) && (password_len > MAXICQPASSLEN)) 227 if (aim_sn_is_icq(sn) && (password_len > MAXICQPASSLEN))
228 password_len = MAXICQPASSLEN; 228 password_len = MAXICQPASSLEN;
229 else if (truncate_pass && password_len > 8) 229 else if (truncate_pass && password_len > 8)
230 password_len = 8; 230 password_len = 8;
231 231
232 aim_encode_password_md5(password, password_len, key, digest); 232 aim_encode_password_md5(password, password_len, key, digest);
475 475
476 if (!od || !conn || !sn) 476 if (!od || !conn || !sn)
477 return -EINVAL; 477 return -EINVAL;
478 478
479 #ifdef USE_XOR_FOR_ICQ 479 #ifdef USE_XOR_FOR_ICQ
480 if (isdigit(sn[0])) 480 if (aim_sn_is_icq(sn))
481 return goddamnicq(od, conn, sn); 481 return goddamnicq(od, conn, sn);
482 #endif 482 #endif
483 483
484 frame = flap_frame_new(od, 0x02, 10+2+2+strlen(sn)+8); 484 frame = flap_frame_new(od, 0x02, 10+2+2+strlen(sn)+8);
485 485

mercurial