Mercurial > pidgin
comparison src/log.c @ 9677:70ff55c0939b
[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!
committer: Tailor Script <tailor@pidgin.im>
| author | Nathan Walp <nwalp@pidgin.im> |
|---|---|
| date | Thu, 05 Aug 2004 17:34:02 +0000 |
| parents | 1b13160bf5a4 |
| children | b85df3f44350 |
comparison
equal
deleted
inserted
replaced
| 9676:f83a80c25703 | 9677:70ff55c0939b |
|---|---|
| 132 g_free(lu); | 132 g_free(lu); |
| 133 } | 133 } |
| 134 | 134 |
| 135 int gaim_log_get_total_size(GaimLogType type, const char *name, GaimAccount *account) | 135 int gaim_log_get_total_size(GaimLogType type, const char *name, GaimAccount *account) |
| 136 { | 136 { |
| 137 int size; | 137 gpointer ptrsize; |
| 138 int size = 0; | |
| 138 GSList *n; | 139 GSList *n; |
| 139 struct _gaim_logsize_user *lu; | 140 struct _gaim_logsize_user *lu; |
| 140 | 141 |
| 141 lu = g_new(struct _gaim_logsize_user, 1); | 142 lu = g_new(struct _gaim_logsize_user, 1); |
| 142 lu->name = g_strdup(gaim_normalize(account, name)); | 143 lu->name = g_strdup(gaim_normalize(account, name)); |
| 143 lu->account = account; | 144 lu->account = account; |
| 144 | 145 |
| 145 if((size = GPOINTER_TO_INT(g_hash_table_lookup(logsize_users, lu)))) { | 146 if(g_hash_table_lookup_extended(logsize_users, lu, NULL, &ptrsize)) { |
| 147 size = GPOINTER_TO_INT(ptrsize); | |
| 146 g_free(lu->name); | 148 g_free(lu->name); |
| 147 g_free(lu); | 149 g_free(lu); |
| 148 } else { | 150 } else { |
| 149 for (n = loggers; n; n = n->next) { | 151 for (n = loggers; n; n = n->next) { |
| 150 GaimLogLogger *logger = n->data; | 152 GaimLogLogger *logger = n->data; |
