# HG changeset patch # User Mark Doliner # Date 1165695103 0 # Node ID 66c857a355b45b3d955e7b26a162992ffd91e7fa # Parent 05c55c2b6c25da599a9cfdf5f676640d0f6ee62b [gaim-migrate @ 17927] Stephen Pope in #gaim found a bug in our perl stuff where we were creating some hash tables that used g_direct_hash instead of g_str_hash committer: Tailor Script diff -r 05c55c2b6c25 -r 66c857a355b4 COPYRIGHT --- a/COPYRIGHT Sat Dec 09 07:39:29 2006 +0000 +++ b/COPYRIGHT Sat Dec 09 20:11:43 2006 +0000 @@ -241,6 +241,7 @@ Julien Pivotto Ari Pollak Robey Pointer +Stephen Pope Nathan Poznick Jory A. Pratt Brent Priddy diff -r 05c55c2b6c25 -r 66c857a355b4 libgaim/blist.h --- a/libgaim/blist.h Sat Dec 09 07:39:29 2006 +0000 +++ b/libgaim/blist.h Sat Dec 09 20:11:43 2006 +0000 @@ -314,7 +314,9 @@ * * @param account The account this chat will get added to * @param alias The alias of the new chat - * @param components The info the prpl needs to join the chat + * @param components The info the prpl needs to join the chat. The + * hash function should be g_str_hash() and the + * equal function should be g_str_equal(). * @return A newly allocated chat */ GaimChat *gaim_chat_new(GaimAccount *account, const char *alias, GHashTable *components); diff -r 05c55c2b6c25 -r 66c857a355b4 libgaim/plugins/perl/common/BuddyList.xs --- a/libgaim/plugins/perl/common/BuddyList.xs Sat Dec 09 07:39:29 2006 +0000 +++ b/libgaim/plugins/perl/common/BuddyList.xs Sat Dec 09 20:11:43 2006 +0000 @@ -310,7 +310,7 @@ char *t_key, *t_value; CODE: t_HV = (HV *)SvRV(components); - t_GHash = g_hash_table_new(NULL, NULL); + t_GHash = g_hash_table_new(g_str_hash, g_str_equal); for (t_HE = hv_iternext(t_HV); t_HE != NULL; t_HE = hv_iternext(t_HV) ) { t_key = hv_iterkey(t_HE, &len); diff -r 05c55c2b6c25 -r 66c857a355b4 libgaim/plugins/perl/common/Server.xs --- a/libgaim/plugins/perl/common/Server.xs Sat Dec 09 07:39:29 2006 +0000 +++ b/libgaim/plugins/perl/common/Server.xs Sat Dec 09 20:11:43 2006 +0000 @@ -80,7 +80,7 @@ char *t_key, *t_value; CODE: t_HV = (HV *)SvRV(components); - t_GHash = g_hash_table_new(NULL, NULL); + t_GHash = g_hash_table_new(g_str_hash, g_str_equal); for (t_HE = hv_iternext(t_HV); t_HE != NULL; t_HE = hv_iternext(t_HV) ) { t_key = hv_iterkey(t_HE, &len); @@ -135,7 +135,7 @@ char *t_key, *t_value; CODE: t_HV = (HV *)SvRV(components); - t_GHash = g_hash_table_new(NULL, NULL); + t_GHash = g_hash_table_new(g_str_hash, g_str_equal); for (t_HE = hv_iternext(t_HV); t_HE != NULL; t_HE = hv_iternext(t_HV) ) { t_key = hv_iterkey(t_HE, &len); @@ -165,7 +165,7 @@ char *t_key, *t_value; CODE: t_HV = (HV *)SvRV(components); - t_GHash = g_hash_table_new(NULL, NULL); + t_GHash = g_hash_table_new(g_str_hash, g_str_equal); for (t_HE = hv_iternext(t_HV); t_HE != NULL; t_HE = hv_iternext(t_HV) ) { t_key = hv_iterkey(t_HE, &len); diff -r 05c55c2b6c25 -r 66c857a355b4 libgaim/server.h --- a/libgaim/server.h Sat Dec 09 07:39:29 2006 +0000 +++ b/libgaim/server.h Sat Dec 09 20:11:43 2006 +0000 @@ -59,8 +59,6 @@ void serv_rem_permit(GaimConnection *, const char *); void serv_rem_deny(GaimConnection *, const char *); void serv_set_permit_deny(GaimConnection *); -void serv_join_chat(GaimConnection *, GHashTable *); -void serv_reject_chat(GaimConnection *, GHashTable *); void serv_chat_invite(GaimConnection *, int, const char *, const char *); void serv_chat_leave(GaimConnection *, int); void serv_chat_whisper(GaimConnection *, int, const char *, const char *); @@ -91,9 +89,27 @@ void serv_got_im(GaimConnection *gc, const char *who, const char *msg, GaimMessageFlags flags, time_t mtime); + +/** + * @param data The hash function should be g_str_hash() and the equal + * function should be g_str_equal(). + */ +void serv_join_chat(GaimConnection *, GHashTable *); + +/** + * @param data The hash function should be g_str_hash() and the equal + * function should be g_str_equal(). + */ +void serv_reject_chat(GaimConnection *, GHashTable *); + +/** + * @param data The hash function should be g_str_hash() and the equal + * function should be g_str_equal(). + */ void serv_got_chat_invite(GaimConnection *gc, const char *name, const char *who, const char *message, GHashTable *data); + GaimConversation *serv_got_joined_chat(GaimConnection *gc, int id, const char *name); void serv_got_chat_left(GaimConnection *g, int id);