changeset 28674:858d9563ee8c

merge of '6a834614341327cc0cbbdc3887692354df8999e3' and '903af32836ce489b57aec5f255ba91e9e675526f'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 29 Sep 2009 01:36:03 +0000
parents dfabdc9cce88 (diff) 67a97fca157c (current diff)
children a501f14e6961
files
diffstat 2 files changed, 6 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jingle/content.c	Mon Sep 28 18:11:28 2009 +0000
+++ b/libpurple/protocols/jabber/jingle/content.c	Tue Sep 29 01:36:03 2009 +0000
@@ -330,8 +330,8 @@
 void
 jingle_content_set_session(JingleContent *content, JingleSession *session)
 {
-	JINGLE_IS_CONTENT(content);
-	JINGLE_IS_SESSION(session);
+	g_return_if_fail(JINGLE_IS_CONTENT(content));
+	g_return_if_fail(JINGLE_IS_SESSION(session));
 	g_object_set(content, "session", session, NULL);
 }
 
--- a/libpurple/protocols/yahoo/libymsg.c	Mon Sep 28 18:11:28 2009 +0000
+++ b/libpurple/protocols/yahoo/libymsg.c	Tue Sep 29 01:36:03 2009 +0000
@@ -983,7 +983,10 @@
 	if( (pkt_type == YAHOO_PKT_TYPE_P2P) && (val_11 != yd->session_id) ) {
 		purple_debug_warning("yahoo","p2p: %s sent us message with wrong session id. Disconnecting p2p connection to peer\n", im ? im->from : "(im was null)");
 		/* remove from p2p connection lists, also calls yahoo_p2p_disconnect_destroy_data */
-		g_hash_table_remove(yd->peers, im->from);
+		if (im) {
+			g_hash_table_remove(yd->peers, im->from);
+			g_free(im);
+		}
 		return;
 	}
 
@@ -1025,7 +1028,6 @@
 		char *m, *m2;
 		char *msn_from = NULL;
 		const char *from;
-		PurpleConversation *c;
 		im = l->data;
 
 		if (!im->from || !im->msg) {
@@ -1077,14 +1079,9 @@
 			from = im->from;
 		}
 
-		c = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, from, account);
-
 		if (!strcmp(m, "<ding>")) {
 			char *username;
 
-			if (c == NULL) {
-				c = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, from);
-			}
 			username = g_markup_escape_text(from, -1);
 			purple_prpl_got_attention(gc, username, YAHOO_BUZZ);
 			g_free(username);