comparison libpurple/protocols/qq/buddy_list.c @ 24631:80deea528c4b

Clean debug info
author Hu Yong <ccpaging@gmail.com>
date Wed, 12 Nov 2008 08:29:09 +0000
parents b22f6fb98cca
children 7f903e67a995 65cfc59858cf
comparison
equal deleted inserted replaced
24630:699e8f0571ac 24631:80deea528c4b
146 /* 013-014: client tag */ 146 /* 013-014: client tag */
147 bytes += qq_get16(&bs->unknown3, data + bytes); 147 bytes += qq_get16(&bs->unknown3, data + bytes);
148 /* 015-030: unknown key */ 148 /* 015-030: unknown key */
149 bytes += qq_getdata(&(bs->unknown_key[0]), QQ_KEY_LENGTH, data + bytes); 149 bytes += qq_getdata(&(bs->unknown_key[0]), QQ_KEY_LENGTH, data + bytes);
150 150
151 purple_debug_info("QQ_STATUS", 151 purple_debug_info("QQ", "Status:%d, uid: %u, ip: %s:%d, U: %d - %d - %04X\n",
152 "uid: %u, U1: %d, ip: %s:%d, U2:%d, status:%d, U3:%04X\n", 152 bs->status, bs->uid, inet_ntoa(bs->ip), bs->port,
153 bs->uid, bs->unknown1, inet_ntoa(bs->ip), bs->port, 153 bs->unknown1, bs->unknown2, bs->unknown3);
154 bs->unknown2, bs->status, bs->unknown3);
155 154
156 return bytes; 155 return bytes;
157 } 156 }
158 157
159 /* process the reply packet for get_buddies_online packet */ 158 /* process the reply packet for get_buddies_online packet */
568 /* create no-auth buddy */ 567 /* create no-auth buddy */
569 buddy = qq_buddy_new(gc, bs.uid); 568 buddy = qq_buddy_new(gc, bs.uid);
570 } 569 }
571 bd = (buddy == NULL) ? NULL : (qq_buddy_data *) buddy->proto_data; 570 bd = (buddy == NULL) ? NULL : (qq_buddy_data *) buddy->proto_data;
572 if (bd == NULL) { 571 if (bd == NULL) {
573 purple_debug_warning("QQ", "Get status of unknown buddy %u\n", bs.uid); 572 purple_debug_warning("QQ", "Got status of no-auth buddy %u\n", bs.uid);
574 return; 573 return;
575 } 574 }
576 575
577 if(bs.ip.s_addr != 0) { 576 if(bs.ip.s_addr != 0) {
578 bd->ip.s_addr = bs.ip.s_addr; 577 bd->ip.s_addr = bs.ip.s_addr;
628 status_id = "invisible"; 627 status_id = "invisible";
629 purple_debug_error("QQ", "unknown status: 0x%X\n", status); 628 purple_debug_error("QQ", "unknown status: 0x%X\n", status);
630 break; 629 break;
631 } 630 }
632 631
633 purple_debug_info("QQ", "Update buddy %u status as %s\n", uid, status_id); 632 purple_debug_info("QQ", "buddy %u status = %s\n", uid, status_id);
634 who = uid_to_purple_name(uid); 633 who = uid_to_purple_name(uid);
635 purple_prpl_got_user_status(gc->account, who, status_id, NULL); 634 purple_prpl_got_user_status(gc->account, who, status_id, NULL);
636 635
637 if (flag & QQ_COMM_FLAG_MOBILE && status != QQ_BUDDY_OFFLINE) 636 if (flag & QQ_COMM_FLAG_MOBILE && status != QQ_BUDDY_OFFLINE)
638 purple_prpl_got_user_status(gc->account, who, "mobile", NULL); 637 purple_prpl_got_user_status(gc->account, who, "mobile", NULL);