comparison libpurple/protocols/oscar/family_auth.c @ 30390:553cd883a29a

Removed '#if 0/endif' blocks. Some of them have the form of TODO, but most of them are years old, so that shouldn't be a big deal.
author ivan.komarov@soc.pidgin.im
date Wed, 28 Jul 2010 19:37:26 +0000
parents 259bbfb423d4
children 11c54d781835
comparison
equal deleted inserted replaced
30389:43dae0cda901 30390:553cd883a29a
54 */ 54 */
55 static int 55 static int
56 aim_encode_password(const char *password, guint8 *encoded) 56 aim_encode_password(const char *password, guint8 *encoded)
57 { 57 {
58 guint8 encoding_table[] = { 58 guint8 encoding_table[] = {
59 #if 0 /* old v1 table */
60 0xf3, 0xb3, 0x6c, 0x99,
61 0x95, 0x3f, 0xac, 0xb6,
62 0xc5, 0xfa, 0x6b, 0x63,
63 0x69, 0x6c, 0xc3, 0x9f
64 #else /* v2.1 table, also works for ICQ */
65 0xf3, 0x26, 0x81, 0xc4, 59 0xf3, 0x26, 0x81, 0xc4,
66 0x39, 0x86, 0xdb, 0x92, 60 0x39, 0x86, 0xdb, 0x92,
67 0x71, 0xa3, 0xb9, 0xe6, 61 0x71, 0xa3, 0xb9, 0xe6,
68 0x53, 0x7a, 0x95, 0x7c 62 0x53, 0x7a, 0x95, 0x7c
69 #endif
70 }; 63 };
71 unsigned int i; 64 unsigned int i;
72 65
73 for (i = 0; i < strlen(password); i++) 66 for (i = 0; i < strlen(password); i++)
74 encoded[i] = (password[i] ^ encoding_table[i]); 67 encoded[i] = (password[i] ^ encoding_table[i]);
383 if (aim_tlv_gettlv(tlvlist, 0x0042, 1)) 376 if (aim_tlv_gettlv(tlvlist, 0x0042, 1))
384 info->latestbeta.info = aim_tlv_getstr(tlvlist, 0x0042, 1); 377 info->latestbeta.info = aim_tlv_getstr(tlvlist, 0x0042, 1);
385 if (aim_tlv_gettlv(tlvlist, 0x0043, 1)) 378 if (aim_tlv_gettlv(tlvlist, 0x0043, 1))
386 info->latestbeta.name = aim_tlv_getstr(tlvlist, 0x0043, 1); 379 info->latestbeta.name = aim_tlv_getstr(tlvlist, 0x0043, 1);
387 380
388 #if 0
389 if (aim_tlv_gettlv(tlvlist, 0x0048, 1)) {
390 /* beta serial */
391 }
392 #endif
393
394 if (aim_tlv_gettlv(tlvlist, 0x0044, 1)) 381 if (aim_tlv_gettlv(tlvlist, 0x0044, 1))
395 info->latestrelease.build = aim_tlv_get32(tlvlist, 0x0044, 1); 382 info->latestrelease.build = aim_tlv_get32(tlvlist, 0x0044, 1);
396 if (aim_tlv_gettlv(tlvlist, 0x0045, 1)) 383 if (aim_tlv_gettlv(tlvlist, 0x0045, 1))
397 info->latestrelease.url = aim_tlv_getstr(tlvlist, 0x0045, 1); 384 info->latestrelease.url = aim_tlv_getstr(tlvlist, 0x0045, 1);
398 if (aim_tlv_gettlv(tlvlist, 0x0046, 1)) 385 if (aim_tlv_gettlv(tlvlist, 0x0046, 1))
399 info->latestrelease.info = aim_tlv_getstr(tlvlist, 0x0046, 1); 386 info->latestrelease.info = aim_tlv_getstr(tlvlist, 0x0046, 1);
400 if (aim_tlv_gettlv(tlvlist, 0x0047, 1)) 387 if (aim_tlv_gettlv(tlvlist, 0x0047, 1))
401 info->latestrelease.name = aim_tlv_getstr(tlvlist, 0x0047, 1); 388 info->latestrelease.name = aim_tlv_getstr(tlvlist, 0x0047, 1);
402 389
403 #if 0
404 if (aim_tlv_gettlv(tlvlist, 0x0049, 1)) {
405 /* lastest release serial */
406 }
407 #endif
408
409 /* 390 /*
410 * URL to change password. 391 * URL to change password.
411 */ 392 */
412 if (aim_tlv_gettlv(tlvlist, 0x0054, 1)) 393 if (aim_tlv_gettlv(tlvlist, 0x0054, 1))
413 info->chpassurl = aim_tlv_getstr(tlvlist, 0x0054, 1); 394 info->chpassurl = aim_tlv_getstr(tlvlist, 0x0054, 1);
414
415 #if 0
416 /*
417 * Unknown. Seen on an @mac.com username with value of 0x003f
418 */
419 if (aim_tlv_gettlv(tlvlist, 0x0055, 1)) {
420 /* Unhandled */
421 }
422 #endif
423 395
424 od->authinfo = info; 396 od->authinfo = info;
425 397
426 if ((userfunc = aim_callhandler(od, snac ? snac->family : SNAC_FAMILY_AUTH, snac ? snac->subtype : 0x0003))) 398 if ((userfunc = aim_callhandler(od, snac ? snac->family : SNAC_FAMILY_AUTH, snac ? snac->subtype : 0x0003)))
427 ret = userfunc(od, conn, frame, info); 399 ret = userfunc(od, conn, frame, info);