comparison src/server.c @ 9613:1b13160bf5a4

[gaim-migrate @ 10456] "Okay, now it's better. Still should close #997210. Note the list below is mostly the same as my initial comment and replaces the former information. 1) Prevent a crash if you sign off and try to dequeue messages from the away dialog. This was because we tried to use the destroyed GaimConnection in a couple places to get the prpl's name for the HTML logger and other conversation data. We look up the information via the account instead. 2) Prevent a possible crash if gaim_gtkconv_write_conv is called with who as NULL. 3) Prevent (null) or an empty string from being logged as the sender's name if the sender no longer has an alias because the account is signed off." --Kevin Stange committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Thu, 29 Jul 2004 03:11:00 +0000
parents 15d09e546cee
children c001be3c330e
comparison
equal deleted inserted replaced
9612:a11bc3f5c3e3 9613:1b13160bf5a4
1206 gaim_prefs_get_bool("/core/logging/log_signon_signoff")) { 1206 gaim_prefs_get_bool("/core/logging/log_signon_signoff")) {
1207 GaimAccount *account = gaim_connection_get_account(gc); 1207 GaimAccount *account = gaim_connection_get_account(gc);
1208 GaimLog *log = gaim_account_get_log(account); 1208 GaimLog *log = gaim_account_get_log(account);
1209 char *tmp = g_strdup_printf(_("%s signed on"), alias); 1209 char *tmp = g_strdup_printf(_("%s signed on"), alias);
1210 1210
1211 gaim_log_write(log, GAIM_MESSAGE_SYSTEM, gaim_get_buddy_alias(b), 1211 gaim_log_write(log, GAIM_MESSAGE_SYSTEM, (alias ? alias : name),
1212 current_time, tmp); 1212 current_time, tmp);
1213 g_free(tmp); 1213 g_free(tmp);
1214 } 1214 }
1215 } 1215 }
1216 1216
1224 tmp = g_strdup_printf(_("%s came back"), alias); 1224 tmp = g_strdup_printf(_("%s came back"), alias);
1225 else if(!(b->uc & UC_UNAVAILABLE) && (type & UC_UNAVAILABLE)) 1225 else if(!(b->uc & UC_UNAVAILABLE) && (type & UC_UNAVAILABLE))
1226 tmp = g_strdup_printf(_("%s went away"), alias); 1226 tmp = g_strdup_printf(_("%s went away"), alias);
1227 1227
1228 if(tmp){ 1228 if(tmp){
1229 gaim_log_write(log, GAIM_MESSAGE_SYSTEM, gaim_get_buddy_alias(b), 1229 gaim_log_write(log, GAIM_MESSAGE_SYSTEM, (alias ? alias : name),
1230 current_time, tmp); 1230 current_time, tmp);
1231 g_free(tmp); 1231 g_free(tmp);
1232 } 1232 }
1233 } 1233 }
1234 1234
1237 gaim_prefs_get_bool("/core/logging/log_idle_state")) { 1237 gaim_prefs_get_bool("/core/logging/log_idle_state")) {
1238 GaimAccount *account = gaim_connection_get_account(gc); 1238 GaimAccount *account = gaim_connection_get_account(gc);
1239 GaimLog *log = gaim_account_get_log(account); 1239 GaimLog *log = gaim_account_get_log(account);
1240 char *tmp = g_strdup_printf(_("%s became idle"), alias); 1240 char *tmp = g_strdup_printf(_("%s became idle"), alias);
1241 1241
1242 gaim_log_write(log, GAIM_MESSAGE_SYSTEM, gaim_get_buddy_alias(b), 1242 gaim_log_write(log, GAIM_MESSAGE_SYSTEM, (alias ? alias : name),
1243 current_time, tmp); 1243 current_time, tmp);
1244 g_free(tmp); 1244 g_free(tmp);
1245 } 1245 }
1246 } else if (old_idle && !idle) { 1246 } else if (old_idle && !idle) {
1247 if(gaim_prefs_get_bool("/core/logging/log_system") && 1247 if(gaim_prefs_get_bool("/core/logging/log_system") &&
1248 gaim_prefs_get_bool("/core/logging/log_idle_state")) { 1248 gaim_prefs_get_bool("/core/logging/log_idle_state")) {
1249 GaimAccount *account = gaim_connection_get_account(gc); 1249 GaimAccount *account = gaim_connection_get_account(gc);
1250 GaimLog *log = gaim_account_get_log(account); 1250 GaimLog *log = gaim_account_get_log(account);
1251 char *tmp = g_strdup_printf(_("%s became unidle"), alias); 1251 char *tmp = g_strdup_printf(_("%s became unidle"), alias);
1252 1252
1253 gaim_log_write(log, GAIM_MESSAGE_SYSTEM, gaim_get_buddy_alias(b), 1253 gaim_log_write(log, GAIM_MESSAGE_SYSTEM, (alias ? alias : name),
1254 current_time, tmp); 1254 current_time, tmp);
1255 g_free(tmp); 1255 g_free(tmp);
1256 } 1256 }
1257 } 1257 }
1258 1258
1278 gaim_prefs_get_bool("/core/logging/log_signon_signoff")) { 1278 gaim_prefs_get_bool("/core/logging/log_signon_signoff")) {
1279 GaimAccount *account = gaim_connection_get_account(gc); 1279 GaimAccount *account = gaim_connection_get_account(gc);
1280 GaimLog *log = gaim_account_get_log(account); 1280 GaimLog *log = gaim_account_get_log(account);
1281 char *tmp = g_strdup_printf(_("%s signed off"), alias); 1281 char *tmp = g_strdup_printf(_("%s signed off"), alias);
1282 1282
1283 gaim_log_write(log, GAIM_MESSAGE_SYSTEM, gaim_get_buddy_alias(b), 1283 gaim_log_write(log, GAIM_MESSAGE_SYSTEM, (alias ? alias : name),
1284 current_time, tmp); 1284 current_time, tmp);
1285 g_free(tmp); 1285 g_free(tmp);
1286 } 1286 }
1287 } 1287 }
1288 1288