Mercurial > pidgin
comparison src/protocols/oscar/locate.c @ 11253:7d31d61e6438
[gaim-migrate @ 13422]
Get rid of faimdprintf and use gaim_debug functions instead
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 13 Aug 2005 06:43:45 +0000 |
parents | bd8ac1d4b2f2 |
children | 1b1d63602d77 |
comparison
equal
deleted
inserted
replaced
11252:55356a29cdd1 | 11253:7d31d61e6438 |
---|---|
1 /* | 1 /* |
2 * Family 0x0002 - Locate. | 2 * Family 0x0002 - Locate. |
3 * | 3 * |
4 * The functions here are responsible for requesting and parsing information- | 4 * The functions here are responsible for requesting and parsing information- |
5 * gathering SNACs. Or something like that. This family contains the SNACs | 5 * gathering SNACs. Or something like that. This family contains the SNACs |
6 * for getting and setting info, away messages, directory profile thingy, etc. | 6 * for getting and setting info, away messages, directory profile thingy, etc. |
7 */ | 7 */ |
8 | 8 |
9 #define FAIM_INTERNAL | 9 #define FAIM_INTERNAL |
10 #include <aim.h> | 10 #include <aim.h> |
11 #ifdef _WIN32 | 11 #ifdef _WIN32 |
12 #include "win32dep.h" | 12 #include "win32dep.h" |
13 #endif | 13 #endif |
14 | 14 |
15 /* | 15 /* |
16 * Capability blocks. | 16 * Capability blocks. |
17 * | 17 * |
18 * These are CLSIDs. They should actually be of the form: | 18 * These are CLSIDs. They should actually be of the form: |
19 * | 19 * |
20 * {0x0946134b, 0x4c7f, 0x11d1, | 20 * {0x0946134b, 0x4c7f, 0x11d1, |
21 * {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, | 21 * {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, |
398 break; /* should only match once... */ | 398 break; /* should only match once... */ |
399 } | 399 } |
400 } | 400 } |
401 | 401 |
402 if (!identified) | 402 if (!identified) |
403 faimdprintf(sess, 0, "unknown capability: {%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n", | 403 gaim_debug_misc("oscar", "unknown capability: {%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n", |
404 cap[0], cap[1], cap[2], cap[3], | 404 cap[0], cap[1], cap[2], cap[3], |
405 cap[4], cap[5], | 405 cap[4], cap[5], |
406 cap[6], cap[7], | 406 cap[6], cap[7], |
407 cap[8], cap[9], | 407 cap[8], cap[9], |
408 cap[10], cap[11], cap[12], cap[13], | 408 cap[10], cap[11], cap[12], cap[13], |
432 break; /* should only match once... */ | 432 break; /* should only match once... */ |
433 } | 433 } |
434 } | 434 } |
435 | 435 |
436 if (!identified) | 436 if (!identified) |
437 faimdprintf(sess, 0, "unknown short capability: {%02x%02x}\n", cap[0], cap[1]); | 437 gaim_debug_misc("oscar", "unknown short capability: {%02x%02x}\n", cap[0], cap[1]); |
438 | 438 |
439 free(cap); | 439 free(cap); |
440 } | 440 } |
441 | 441 |
442 return flags; | 442 return flags; |
467 int i; | 467 int i; |
468 | 468 |
469 if (!sess || !bs || !len) | 469 if (!sess || !bs || !len) |
470 return; | 470 return; |
471 | 471 |
472 faimdprintf(sess, 0, "userinfo: type =0x%04x\n", type); | 472 gaim_debug_misc("oscar", "userinfo: type =0x%04x\n", type); |
473 faimdprintf(sess, 0, "userinfo: length=0x%04x\n", len); | 473 gaim_debug_misc("oscar", "userinfo: length=0x%04x\n", len); |
474 faimdprintf(sess, 0, "userinfo: value:\n"); | 474 gaim_debug_misc("oscar", "userinfo: value:\n"); |
475 | 475 |
476 for (i = 0; i < len; i++) { | 476 for (i = 0; i < len; i++) { |
477 if ((i % 8) == 0) | 477 if ((i % 8) == 0) |
478 faimdprintf(sess, 0, "\nuserinfo: "); | 478 gaim_debug_misc("oscar", "\nuserinfo: "); |
479 faimdprintf(sess, 0, "0x%2x ", aimbs_get8(bs)); | 479 gaim_debug_misc("oscar", "0x%2x ", aimbs_get8(bs)); |
480 } | 480 } |
481 | 481 |
482 faimdprintf(sess, 0, "\n"); | 482 gaim_debug_misc("oscar", "\n"); |
483 | 483 |
484 return; | 484 return; |
485 } | 485 } |
486 | 486 |
487 faim_internal void aim_info_free(aim_userinfo_t *info) | 487 faim_internal void aim_info_free(aim_userinfo_t *info) |
801 * | 801 * |
802 * Either way, inform the owner and attempt | 802 * Either way, inform the owner and attempt |
803 * recovery. | 803 * recovery. |
804 * | 804 * |
805 */ | 805 */ |
806 faimdprintf(sess, 0, "userinfo: **warning: unexpected TLV:\n"); | 806 gaim_debug_misc("oscar", "userinfo: **warning: unexpected TLV:\n"); |
807 faimdprintf(sess, 0, "userinfo: sn =%s\n", outinfo->sn); | 807 gaim_debug_misc("oscar", "userinfo: sn =%s\n", outinfo->sn); |
808 dumptlv(sess, type, bs, length); | 808 dumptlv(sess, type, bs, length); |
809 } | 809 } |
810 | 810 |
811 /* Save ourselves. */ | 811 /* Save ourselves. */ |
812 aim_bstream_setpos(bs, endpos); | 812 aim_bstream_setpos(bs, endpos); |
875 fu16_t reason; | 875 fu16_t reason; |
876 char *sn; | 876 char *sn; |
877 int was_explicit; | 877 int was_explicit; |
878 | 878 |
879 if (!(snac2 = aim_remsnac(sess, snac->id))) { | 879 if (!(snac2 = aim_remsnac(sess, snac->id))) { |
880 faimdprintf(sess, 0, "faim: locate.c, error(): received response from unknown request!\n"); | 880 gaim_debug_misc("oscar", "faim: locate.c, error(): received response from unknown request!\n"); |
881 return 0; | 881 return 0; |
882 } | 882 } |
883 | 883 |
884 if ((snac2->family != 0x0002) && (snac2->type != 0x0015)) { | 884 if ((snac2->family != 0x0002) && (snac2->type != 0x0015)) { |
885 faimdprintf(sess, 0, "faim: locate.c, error(): received response from invalid request! %d\n", snac2->family); | 885 gaim_debug_misc("oscar", "faim: locate.c, error(): received response from invalid request! %d\n", snac2->family); |
886 return 0; | 886 return 0; |
887 } | 887 } |
888 | 888 |
889 if (!(sn = snac2->data)) { | 889 if (!(sn = snac2->data)) { |
890 faimdprintf(sess, 0, "faim: locate.c, error(): received response from request without a screen name!\n"); | 890 gaim_debug_misc("oscar", "faim: locate.c, error(): received response from request without a screen name!\n"); |
891 return 0; | 891 return 0; |
892 } | 892 } |
893 | 893 |
894 reason = aimbs_get16(bs); | 894 reason = aimbs_get16(bs); |
895 | 895 |