changeset 29589:c4fe6afad87a

yahoo: fix decoding of P2P session_id Apparently, inbound P2P packets containing key-11 session_id are no longer sent by the server with a YAHOO_STATUS_BRB, but rather a status value of 11. Since we don't pick up the session_id, the first text message we send over the P2P connection will have a key-11 value of 0, and cause the remote (yahoo) client to disconnect us. This is causing the "lost second line in a conversation" syndrome. Fix it by also accepting status 11 in yahoo_process_p2p(). Fixes #10733. committer: John Bailey <rekkanoryo@rekkanoryo.org>
author vamposdecampos@gmail.com
date Sat, 13 Mar 2010 21:20:54 +0000
parents 78f972c7de0e
children 7d167ca3c30d
files libpurple/protocols/yahoo/libymsg.c libpurple/protocols/yahoo/libymsg.h
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/libymsg.c	Sat Mar 13 20:30:08 2010 +0000
+++ b/libpurple/protocols/yahoo/libymsg.c	Sat Mar 13 21:20:54 2010 +0000
@@ -2733,8 +2733,9 @@
 	PurpleAccount *account;
 	YahooFriend *f;
 
-	/* if status is not 1 ie YAHOO_STATUS_BRB, the packet bounced back, so contains our own ip */
-	if(!(pkt->status == YAHOO_STATUS_BRB))
+	/* if status is not YAHOO_STATUS_BRB or YAHOO_STATUS_P2P, the packet bounced back,
+	 * so it contains our own ip */
+	if(pkt->status != YAHOO_STATUS_BRB && pkt->status != YAHOO_STATUS_P2P)
 		return ;
 
 	while (l) {
--- a/libpurple/protocols/yahoo/libymsg.h	Sat Mar 13 20:30:08 2010 +0000
+++ b/libpurple/protocols/yahoo/libymsg.h	Sat Mar 13 21:20:54 2010 +0000
@@ -119,6 +119,7 @@
 	YAHOO_STATUS_ONVACATION,
 	YAHOO_STATUS_OUTTOLUNCH,
 	YAHOO_STATUS_STEPPEDOUT,
+	YAHOO_STATUS_P2P = 11,
 	YAHOO_STATUS_INVISIBLE = 12,
 	YAHOO_STATUS_CUSTOM = 99,
 	YAHOO_STATUS_IDLE = 999,