Need to implemnt the protocol prpl's chat 'chat_info_defaults' callback. mxit

Mon, 15 Aug 2011 21:08:25 +0000

author
Andrew Victor <andrew.victor@mxit.com>
date
Mon, 15 Aug 2011 21:08:25 +0000
branch
mxit
changeset 32178
3ead8f25f2a9
parent 32177
b4729e4322f3
child 32179
12f603389f15
child 32180
766c92a94b04

Need to implemnt the protocol prpl's chat 'chat_info_defaults' callback.
Otherwise the following occurs in the logs:
hash_table_lookup: assertion 'hash_table' != NULL
when joining a group-chat.

libpurple/protocols/mxit/mxit.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/mxit/mxit.c	Mon Aug 15 20:10:35 2011 +0000
+++ b/libpurple/protocols/mxit/mxit.c	Mon Aug 15 21:08:25 2011 +0000
@@ -654,6 +654,18 @@
 	return m;
 }
 
+
+/*------------------------------------------------------------------------
+ * Return Chat-room default settings.
+ *
+ *  @return		Chat defaults list
+ */
+static GHashTable *mxit_chat_info_defaults(PurpleConnection *gc, const char *chat_name)
+{
+    return g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_free);
+}
+
+
 /*========================================================================================================================*/
 
 static PurplePluginProtocolInfo proto_info = {
@@ -675,7 +687,7 @@
 	mxit_status_types,		/* status types				[roster.c] */
 	mxit_blist_menu,		/* blist_node_menu */
 	mxit_chat_info,			/* chat_info				[multimx.c] */
-	NULL,					/* chat_info_defaults */
+	mxit_chat_info_defaults,/* chat_info_defaults */
 	mxit_login,				/* login					[login.c] */
 	mxit_close,				/* close */
 	mxit_send_im,			/* send_im */

mercurial