Mercurial > pidgin.yaz
comparison libpurple/protocols/qq/send_file.c @ 24080:818ab62006f5
2008.10.07 - ccpaging <ccpaging(at)gmail.com>
* Update qq_buddy
author | SHiNE CsyFeK <csyfek@gmail.com> |
---|---|
date | Wed, 22 Oct 2008 14:59:55 +0000 |
parents | 619ac2303c46 |
children | 662fdd4836aa e35115192593 |
comparison
equal
deleted
inserted
replaced
24079:1bdf7b602684 | 24080:818ab62006f5 |
---|---|
769 qq_data *qd; | 769 qq_data *qd; |
770 PurpleXfer *xfer; | 770 PurpleXfer *xfer; |
771 gchar *sender_name, **fileinfo; | 771 gchar *sender_name, **fileinfo; |
772 ft_info *info; | 772 ft_info *info; |
773 PurpleBuddy *b; | 773 PurpleBuddy *b; |
774 qq_buddy *q_bud; | 774 qq_buddy_data *bd; |
775 gint bytes; | 775 gint bytes; |
776 | 776 |
777 g_return_if_fail (data != NULL && data_len != 0); | 777 g_return_if_fail (data != NULL && data_len != 0); |
778 qd = (qq_data *) gc->proto_data; | 778 qd = (qq_data *) gc->proto_data; |
779 | 779 |
802 if(g_ascii_strcasecmp(fileinfo[0], "FACE") == 0) { | 802 if(g_ascii_strcasecmp(fileinfo[0], "FACE") == 0) { |
803 purple_debug_warning("QQ", | 803 purple_debug_warning("QQ", |
804 "Received a FACE ip detect from %d, so he/she must be online :)\n", sender_uid); | 804 "Received a FACE ip detect from %d, so he/she must be online :)\n", sender_uid); |
805 | 805 |
806 b = purple_find_buddy(gc->account, sender_name); | 806 b = purple_find_buddy(gc->account, sender_name); |
807 q_bud = (b == NULL) ? NULL : (qq_buddy *) b->proto_data; | 807 bd = (b == NULL) ? NULL : (qq_buddy_data *) b->proto_data; |
808 if (q_bud) { | 808 if (bd) { |
809 if(0 != info->remote_real_ip) { | 809 if(0 != info->remote_real_ip) { |
810 g_memmove(&(q_bud->ip), &info->remote_real_ip, sizeof(q_bud->ip)); | 810 g_memmove(&(bd->ip), &info->remote_real_ip, sizeof(bd->ip)); |
811 q_bud->port = info->remote_minor_port; | 811 bd->port = info->remote_minor_port; |
812 } | 812 } |
813 else if (0 != info->remote_internet_ip) { | 813 else if (0 != info->remote_internet_ip) { |
814 g_memmove(&(q_bud->ip), &info->remote_internet_ip, sizeof(q_bud->ip)); | 814 g_memmove(&(bd->ip), &info->remote_internet_ip, sizeof(bd->ip)); |
815 q_bud->port = info->remote_major_port; | 815 bd->port = info->remote_major_port; |
816 } | 816 } |
817 | 817 |
818 if(!is_online(q_bud->status)) { | 818 if(!is_online(bd->status)) { |
819 q_bud->status = QQ_BUDDY_ONLINE_INVISIBLE; | 819 bd->status = QQ_BUDDY_ONLINE_INVISIBLE; |
820 qq_update_buddy_contact(gc, q_bud); | 820 bd->last_update = time(NULL); |
821 qq_update_buddy_status(gc, bd->uid, bd->status, bd->comm_flag); | |
821 } | 822 } |
822 else | 823 else |
823 purple_debug_info("QQ", "buddy %d is already online\n", sender_uid); | 824 purple_debug_info("QQ", "buddy %d is already online\n", sender_uid); |
824 | 825 |
825 } | 826 } |