comparison src/server.c @ 6243:34d553c43e8b

[gaim-migrate @ 6737] This doesn't fix the "moving Buddies Causes Lockup" bug, but I looked into it. Gaim is looping at the end of serv_got_update(), in the while loop on line 1146 I see two possible causes for this: 1) gaim_find_buddy() is incorrectly iterating through the blist 2) dragging buddies like there's no tomorrow messes up the order of the blist Someone with more knowledge of how the blist works should look into this before 0.67 It is not an oscar problem :-) committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 20 Jul 2003 07:35:32 +0000
parents 97835d03f0bb
children 9083f92e0d58
comparison
equal deleted inserted replaced
6242:f0b0c5bca588 6243:34d553c43e8b
976 * then display it. Easy. 976 * then display it. Easy.
977 */ 977 */
978 978
979 /* XXX UGLY HACK OF THE YEAR 979 /* XXX UGLY HACK OF THE YEAR
980 * Robot101 will fix this after his exams. honest. 980 * Robot101 will fix this after his exams. honest.
981 * I guess he didn't specify WHICH exams, exactly...
981 */ 982 */
982 if (docklet_count && 983 if (docklet_count &&
983 gaim_prefs_get_bool("/plugins/gtk/docklet/queue_messages") && 984 gaim_prefs_get_bool("/plugins/gtk/docklet/queue_messages") &&
984 !gaim_find_conversation(name)) { 985 !gaim_find_conversation(name)) {
985 /* 986 /*
1035 } 1036 }
1036 g_free(tmp); 1037 g_free(tmp);
1037 } 1038 }
1038 1039
1039 if (!b) { 1040 if (!b) {
1040 gaim_debug(GAIM_DEBUG_ERROR, "server", 1041 gaim_debug(GAIM_DEBUG_ERROR, "server", "No such buddy: %s\n", name);
1041 "No such buddy: %s\n", name);
1042 return; 1042 return;
1043 } 1043 }
1044 1044
1045 /* This code will 'align' the name from the TOC */ 1045 /* This code will 'align' the name from the TOC */
1046 /* server with what's in our record. We want to */ 1046 /* server with what's in our record. We want to */
1052 1052
1053 if (!b->idle && idle) { 1053 if (!b->idle && idle) {
1054 gaim_pounce_execute(gc->account, b->name, GAIM_POUNCE_IDLE); 1054 gaim_pounce_execute(gc->account, b->name, GAIM_POUNCE_IDLE);
1055 gaim_event_broadcast(event_buddy_idle, gc, b->name); 1055 gaim_event_broadcast(event_buddy_idle, gc, b->name);
1056 system_log(log_idle, gc, b, OPT_LOG_BUDDY_IDLE); 1056 system_log(log_idle, gc, b, OPT_LOG_BUDDY_IDLE);
1057 } 1057 } else if (b->idle && !idle) {
1058 if (b->idle && !idle) {
1059 gaim_pounce_execute(gc->account, b->name, GAIM_POUNCE_IDLE_RETURN); 1058 gaim_pounce_execute(gc->account, b->name, GAIM_POUNCE_IDLE_RETURN);
1060 gaim_event_broadcast(event_buddy_unidle, gc, b->name); 1059 gaim_event_broadcast(event_buddy_unidle, gc, b->name);
1061 system_log(log_unidle, gc, b, OPT_LOG_BUDDY_IDLE); 1060 system_log(log_unidle, gc, b, OPT_LOG_BUDDY_IDLE);
1062 } 1061 }
1063 1062
1132 } 1131 }
1133 } 1132 }
1134 1133
1135 gaim_blist_update_buddy_presence(b, loggedin); 1134 gaim_blist_update_buddy_presence(b, loggedin);
1136 1135
1137 /* Now, update the rest of the buddies in the list */ 1136 /*
1137 * Now, update the rest of the buddies in the list. This is weird, by
1138 * the way. Basically we call gaim_find_buddy() until it returns null.
1139 * Calling gaim_find_buddy() with a name sets a static variable. Then
1140 * calling it without a name uses that static reference to return other
1141 * stuff. We can't be sure that the above code didn't call
1142 * gaim_find_buddy() again with another buddy name, so we "reseed" the
1143 * function here.
1144 */
1145 b = gaim_find_buddy(account, name);
1138 while ((b = gaim_find_buddy(gc->account, NULL)) != NULL) { 1146 while ((b = gaim_find_buddy(gc->account, NULL)) != NULL) {
1139 gaim_blist_update_buddy_presence(b, loggedin); 1147 gaim_blist_update_buddy_presence(b, loggedin);
1140 gaim_blist_update_buddy_idle(b, idle); 1148 gaim_blist_update_buddy_idle(b, idle);
1141 gaim_blist_update_buddy_evil(b, evil); 1149 gaim_blist_update_buddy_evil(b, evil);
1142 gaim_blist_update_buddy_status(b, type); 1150 gaim_blist_update_buddy_status(b, type);