diff src/protocols/jabber/xdata.c @ 8396:387ba791d5f9

[gaim-migrate @ 9125] fix a crash in jabber chats when you leave the chat before closing the configuration dialog, and plug a memleak. Thanks deryni for pointing the crash out committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 04 Mar 2004 17:07:56 +0000
parents f6a5348f7410
children 25e63008d3bb
line wrap: on
line diff
--- a/src/protocols/jabber/xdata.c	Thu Mar 04 05:47:41 2004 +0000
+++ b/src/protocols/jabber/xdata.c	Thu Mar 04 17:07:56 2004 +0000
@@ -146,8 +146,9 @@
 	cb(js, result, user_data);
 }
 
-void jabber_x_data_request(JabberStream *js, xmlnode *packet, jabber_x_data_cb cb, gpointer user_data)
+void *jabber_x_data_request(JabberStream *js, xmlnode *packet, jabber_x_data_cb cb, gpointer user_data)
 {
+	void *handle;
 	xmlnode *fn, *x;
 	GaimRequestFields *fields;
 	GaimRequestFieldGroup *group;
@@ -332,7 +333,8 @@
 	if((x = xmlnode_get_child(packet, "instructions")))
 		instructions = xmlnode_get_data(x);
 
-	gaim_request_fields(js->gc, title, title, instructions, fields, _("OK"), G_CALLBACK(jabber_x_data_ok_cb),
+	handle = gaim_request_fields(js->gc, title, title, instructions, fields,
+			_("OK"), G_CALLBACK(jabber_x_data_ok_cb),
 			_("Cancel"), G_CALLBACK(jabber_x_data_cancel_cb), data);
 
 	if(title)
@@ -340,6 +342,7 @@
 	if(instructions)
 		g_free(instructions);
 
+	return handle;
 }