comparison libpurple/protocols/qq/buddy_info.c @ 23606:bdb38a8bf721

20080717-05-1-fix-keep-alive ccpaging <ecc_hy(at)hotmail.com> * Fixed: Always lost connection. Now send keep alive packet in every 30 seconds * Minor fix for debug information * Filter \r\n and replace with SPCAE in group notive * Fixed a memory leak Tickets: Fixes #4024.
author SHiNE CsyFeK <csyfek@gmail.com>
date Thu, 17 Jul 2008 15:12:42 +0000
parents 55f986ccbb6a
children 1c50f12b1c52
comparison
equal deleted inserted replaced
23605:aade89b06762 23606:bdb38a8bf721
206 } 206 }
207 207
208 return FALSE; 208 return FALSE;
209 } 209 }
210 210
211 static PurpleNotifyUserInfo * 211 static PurpleNotifyUserInfo *
212 info_to_notify_user_info(const contact_info *info) 212 info_to_notify_user_info(const contact_info *info)
213 { 213 {
214 PurpleNotifyUserInfo *user_info = purple_notify_user_info_new(); 214 PurpleNotifyUserInfo *user_info = purple_notify_user_info_new();
215 const gchar *intro; 215 const gchar *intro;
216 gboolean has_extra_info = FALSE; 216 gboolean has_extra_info = FALSE;
217 217
824 static void qq_refresh_buddy_and_myself(contact_info *info, PurpleConnection *gc) 824 static void qq_refresh_buddy_and_myself(contact_info *info, PurpleConnection *gc)
825 { 825 {
826 PurpleBuddy *b; 826 PurpleBuddy *b;
827 qq_data *qd; 827 qq_data *qd;
828 qq_buddy *q_bud; 828 qq_buddy *q_bud;
829 gchar *alias_utf8, *purple_name; 829 gchar *alias_utf8;
830 gchar *purple_name;
830 PurpleAccount *account = purple_connection_get_account(gc); 831 PurpleAccount *account = purple_connection_get_account(gc);
831 832
832 qd = (qq_data *) gc->proto_data; 833 qd = (qq_data *) gc->proto_data;
833 purple_name = uid_to_purple_name(strtol(info->uid, NULL, 10)); 834 purple_name = uid_to_purple_name(strtol(info->uid, NULL, 10));
834 835
1007 bytes += qq_get32(&uid, decr_buf + bytes); 1008 bytes += qq_get32(&uid, decr_buf + bytes);
1008 bytes += qq_get32(&onlineTime, decr_buf + bytes); 1009 bytes += qq_get32(&onlineTime, decr_buf + bytes);
1009 bytes += qq_get16(&level, decr_buf + bytes); 1010 bytes += qq_get16(&level, decr_buf + bytes);
1010 bytes += qq_get16(&timeRemainder, decr_buf + bytes); 1011 bytes += qq_get16(&timeRemainder, decr_buf + bytes);
1011 purple_debug(PURPLE_DEBUG_INFO, "QQ", 1012 purple_debug(PURPLE_DEBUG_INFO, "QQ",
1012 "Level packet entry:\nuid: %d\nonlineTime: %d\nlevel: %d\ntimeRemainder: %d\n", 1013 "Level uid: %d, onlineTime: %d, level: %d, timeRemainder: %d\n",
1013 uid, onlineTime, level, timeRemainder); 1014 uid, onlineTime, level, timeRemainder);
1014 purple_name = uid_to_purple_name(uid); 1015 purple_name = uid_to_purple_name(uid);
1015 b = purple_find_buddy(account, purple_name); 1016 b = purple_find_buddy(account, purple_name);
1016 q_bud = (b == NULL) ? NULL : (qq_buddy *) b->proto_data; 1017 q_bud = (b == NULL) ? NULL : (qq_buddy *) b->proto_data;
1017 1018