im.pidgin.pidgin: 7807e3dc9242ef5bf314960f5d47681270a21775

datallah at pidgin.im datallah at pidgin.im
Thu Nov 15 21:05:39 EST 2007


-----------------------------------------------------------------
Revision: 7807e3dc9242ef5bf314960f5d47681270a21775
Ancestor: 460aba5b2654186a68c8babb283d169aebe69346
Author: datallah at pidgin.im
Date: 2007-11-16T01:59:59
Branch: im.pidgin.pidgin

Modified files:
        libpurple/protocols/yahoo/yahoo.c

ChangeLog: 

Fix #3421 by checking for an existing conversation in which to display a yahoo buzz.

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/yahoo.c	a799a4e42c9e58ca39fa3124fdbc4b6f3dbf42e0
+++ libpurple/protocols/yahoo/yahoo.c	e845e3471f40e0f3692a8c8e6d187e5732923879
@@ -902,12 +902,12 @@ static void yahoo_process_message(Purple
 			PurpleBuddy *buddy;
 			PurpleAccount *account;
 			PurpleConversation *c;
-			char *username, *str;
+			char *username;
 
-			str = NULL;
-
 			account = purple_connection_get_account(gc);
-			c = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, im->from);
+			c = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, im->from, account);
+			if (c == NULL)
+				c = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, im->from);
 
 			if ((buddy = purple_find_buddy(account, im->from)) != NULL)
 				username = g_markup_escape_text(purple_buddy_get_alias(buddy), -1);
@@ -917,7 +917,6 @@ static void yahoo_process_message(Purple
 			serv_got_attention(gc, username, YAHOO_BUZZ);
 
 			g_free(username);
-			g_free(str);
 			g_free(m);
 			g_free(im);
 			continue;
@@ -2097,7 +2096,7 @@ static void yahoo_process_authresp(Purpl
 
 		if (pair->key == 66)
 			err = strtol(pair->value, NULL, 10);
-		if (pair->key == 20)
+		else if (pair->key == 20)
 			url = pair->value;
 
 		l = l->next;


More information about the Commits mailing list