comparison 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
comparison
equal deleted inserted replaced
8395:09083081643a 8396:387ba791d5f9
144 xmlnode_set_attrib(result, "type", "cancel"); 144 xmlnode_set_attrib(result, "type", "cancel");
145 145
146 cb(js, result, user_data); 146 cb(js, result, user_data);
147 } 147 }
148 148
149 void jabber_x_data_request(JabberStream *js, xmlnode *packet, jabber_x_data_cb cb, gpointer user_data) 149 void *jabber_x_data_request(JabberStream *js, xmlnode *packet, jabber_x_data_cb cb, gpointer user_data)
150 { 150 {
151 void *handle;
151 xmlnode *fn, *x; 152 xmlnode *fn, *x;
152 GaimRequestFields *fields; 153 GaimRequestFields *fields;
153 GaimRequestFieldGroup *group; 154 GaimRequestFieldGroup *group;
154 GaimRequestField *field; 155 GaimRequestField *field;
155 156
330 title = xmlnode_get_data(x); 331 title = xmlnode_get_data(x);
331 332
332 if((x = xmlnode_get_child(packet, "instructions"))) 333 if((x = xmlnode_get_child(packet, "instructions")))
333 instructions = xmlnode_get_data(x); 334 instructions = xmlnode_get_data(x);
334 335
335 gaim_request_fields(js->gc, title, title, instructions, fields, _("OK"), G_CALLBACK(jabber_x_data_ok_cb), 336 handle = gaim_request_fields(js->gc, title, title, instructions, fields,
337 _("OK"), G_CALLBACK(jabber_x_data_ok_cb),
336 _("Cancel"), G_CALLBACK(jabber_x_data_cancel_cb), data); 338 _("Cancel"), G_CALLBACK(jabber_x_data_cancel_cb), data);
337 339
338 if(title) 340 if(title)
339 g_free(title); 341 g_free(title);
340 if(instructions) 342 if(instructions)
341 g_free(instructions); 343 g_free(instructions);
342 344
345 return handle;
343 } 346 }
344 347
345 348