changeset 27668:c868575ded5d

Better hash function for the PurpleBuddy lookup hashtables.
author Paul Aurich <paul@darkrain42.org>
date Thu, 16 Jul 2009 20:22:05 +0000
parents f44eda839ea4
children caed9d0b1e67
files libpurple/blist.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/blist.c	Thu Jul 16 20:06:27 2009 +0000
+++ b/libpurple/blist.c	Thu Jul 16 20:22:05 2009 +0000
@@ -92,7 +92,7 @@
 /* This function must not use purple_normalize */
 static guint _purple_blist_hbuddy_hash(struct _purple_hbuddy *hb)
 {
-	return g_str_hash(hb->name);
+	return g_str_hash(hb->name) ^ g_direct_hash(hb->group) ^ g_direct_hash(hb->account);
 }
 
 /* This function must not use purple_normalize */