Mercurial > pidgin.yaz
diff libpurple/protocols/oscar/family_oservice.c @ 29329:4d50162d809e
Put all our rateclass members in a single hash table instead of in one
hash table per rateclass. Should reduce memory usage by using 1 hash
table instead of 5ish for each flap connection
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 03 Feb 2010 01:03:09 +0000 |
parents | 2e3e0801de29 |
children | ad4960c2df28 |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_oservice.c Wed Feb 03 00:07:45 2010 +0000 +++ b/libpurple/protocols/oscar/family_oservice.c Wed Feb 03 01:03:09 2010 +0000 @@ -362,7 +362,6 @@ rateclass->last.tv_sec = now.tv_sec - delta / 1000; rateclass->last.tv_usec = now.tv_usec - (delta % 1000) * 1000; - rateclass->members = g_hash_table_new(g_direct_hash, g_direct_equal); conn->rateclasses = g_slist_prepend(conn->rateclasses, rateclass); if (rateclass->classid == OSCAR_DEFAULT_RATECLASS) @@ -401,9 +400,9 @@ subtype = byte_stream_get16(bs); if (rateclass != NULL) - g_hash_table_insert(rateclass->members, + g_hash_table_insert(conn->rateclass_members, GUINT_TO_POINTER((group << 16) + subtype), - GUINT_TO_POINTER(TRUE)); + rateclass); } }