[gaim-migrate @ 10529]

Thu, 05 Aug 2004 17:34:02 +0000

author
Nathan Walp <nwalp@pidgin.im>
date
Thu, 05 Aug 2004 17:34:02 +0000
changeset 9677
1e4f158006e1
parent 9676
de8905956b6b
child 9678
211ff4c9546f

[gaim-migrate @ 10529]
i think this will make for fewer useless disk reads when you have sort-by-log turned on, and have a lot of people you don't talk to on your buddy list. stalkers rejoice!

src/log.c file | annotate | diff | comparison | revisions
--- a/src/log.c	Thu Aug 05 17:11:10 2004 +0000
+++ b/src/log.c	Thu Aug 05 17:34:02 2004 +0000
@@ -134,7 +134,8 @@
 
 int gaim_log_get_total_size(GaimLogType type, const char *name, GaimAccount *account)
 {
-	int size;
+	gpointer ptrsize;
+	int size = 0;
 	GSList *n;
 	struct _gaim_logsize_user *lu;
 
@@ -142,7 +143,8 @@
 	lu->name = g_strdup(gaim_normalize(account, name));
 	lu->account = account;
 
-	if((size = GPOINTER_TO_INT(g_hash_table_lookup(logsize_users, lu)))) {
+	if(g_hash_table_lookup_extended(logsize_users, lu, NULL, &ptrsize)) {
+		size = GPOINTER_TO_INT(ptrsize);
 		g_free(lu->name);
 		g_free(lu);
 	} else {

mercurial