comparison libpurple/protocols/bonjour/jabber.c @ 21017:8b74b226e023

Fix a double-free that was not fun to track down. Fixes #3688.
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 26 Oct 2007 04:52:56 +0000
parents d55617a15301
children 35b4f1dc4c8d
comparison
equal deleted inserted replaced
21014:0314cb293463 21017:8b74b226e023
365 bonjour_parser_process(pb, message, message_length); 365 bonjour_parser_process(pb, message, message_length);
366 } 366 }
367 367
368 void bonjour_jabber_stream_ended(PurpleBuddy *pb) { 368 void bonjour_jabber_stream_ended(PurpleBuddy *pb) {
369 BonjourBuddy *bb = pb->proto_data; 369 BonjourBuddy *bb = pb->proto_data;
370 PurpleConversation *conv;
371 370
372 purple_debug_info("bonjour", "Recieved conversation close notification from %s.\n", pb->name); 371 purple_debug_info("bonjour", "Recieved conversation close notification from %s.\n", pb->name);
373 372
374 g_return_if_fail(bb != NULL); 373 g_return_if_fail(bb != NULL);
375 374
376 /* Inform the user that the conversation has been closed */ 375 /* Inform the user that the conversation has been closed */
377 if (bb->conversation != NULL) { 376 if (bb->conversation != NULL) {
378 #if 0 377 #if 0
378 PurpleConversation *conv;
379 conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, pb->name, pb->account); 379 conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, pb->name, pb->account);
380 if (conv != NULL) { 380 if (conv != NULL) {
381 char *tmp = g_strdup_printf(_("%s has closed the conversation."), pb->name); 381 char *tmp = g_strdup_printf(_("%s has closed the conversation."), pb->name);
382 purple_conversation_write(conv, NULL, tmp, PURPLE_MESSAGE_SYSTEM, time(NULL)); 382 purple_conversation_write(conv, NULL, tmp, PURPLE_MESSAGE_SYSTEM, time(NULL));
383 g_free(tmp); 383 g_free(tmp);