pidgin.2.5.8: 15280e1a: *** Plucked rev 03e380d307e9063ff3938a7c...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Fri Jun 26 20:15:38 EDT 2009


-----------------------------------------------------------------
Revision: 15280e1a15775de361a2cf2724fea2ce30ee08e2
Ancestor: 634daccc29e66550cbe98be1dd1056d54f080a08
Author: rekkanoryo at pidgin.im
Date: 2009-06-26T22:01:30
Branch: im.pidgin.pidgin.2.5.8
URL: http://d.pidgin.im/viewmtn/revision/info/15280e1a15775de361a2cf2724fea2ce30ee08e2

Modified files:
        ChangeLog libpurple/protocols/msn/cmdproc.c
        libpurple/protocols/msn/history.c
        libpurple/protocols/msn/history.h

ChangeLog: 

*** Plucked rev 03e380d307e9063ff3938a7ccab18085899c6140 (qulogic at pidgin.im):
On MSN, increase the history size for the NS so that people with lots of
buddies on an unknown network (thus requiring many FQY/ADL requests) will
not lose the original request (causing a crash).

Fixes #8579.


-------------- next part --------------
============================================================
--- ChangeLog	d11615b7c6967d4222cc3555074183e6353fa255
+++ ChangeLog	16fcae0cb032f11cf0e7a5e08f00b523110ec351
@@ -4,6 +4,10 @@ version 2.5.8 (06/26/2009):
 	ICQ:
 	* Fix misparsing a web message as an SMS message. (Yuriy Kaminskiy)
 
+	MSN:
+	* Increase NS command history size to prevent crashes on buddy lists that
+	  have a lot of buddies on other networks like Yahoo!.
+
 	MySpace:
 	* Accounts with empty buddy lists are now properly marked as connected.
 	* Fix receiving messages from users of MySpace IM's web client.
============================================================
--- libpurple/protocols/msn/cmdproc.c	26f32ef7f803692995d9028c0655440151d22168
+++ libpurple/protocols/msn/cmdproc.c	94ba2633bdc400cf5c2f3cd6fad8251f5ff4582f
@@ -208,6 +208,7 @@ msn_cmdproc_send(MsnCmdProc *cmdproc, co
 
 	trans = g_new0(MsnTransaction, 1);
 
+	trans->cmdproc = cmdproc;
 	trans->command = g_strdup(command);
 
 	if (format != NULL)
============================================================
--- libpurple/protocols/msn/history.c	27c19ac633ef82ab362d11e895dbb6f6cd6d71f5
+++ libpurple/protocols/msn/history.c	fd036e6319806dce7de6054eac6928050ced2a81
@@ -68,6 +68,7 @@ msn_history_add(MsnHistory *history, Msn
 msn_history_add(MsnHistory *history, MsnTransaction *trans)
 {
 	GQueue *queue;
+	int max_elems;
 
 	g_return_if_fail(history != NULL);
 	g_return_if_fail(trans   != NULL);
@@ -78,7 +79,12 @@ msn_history_add(MsnHistory *history, Msn
 
 	g_queue_push_tail(queue, trans);
 
-	if (queue->length > MSN_HIST_ELEMS)
+	if (trans->cmdproc->servconn->type == MSN_SERVCONN_NS)
+		max_elems = MSN_NS_HIST_ELEMS;
+	else
+		max_elems = MSN_SB_HIST_ELEMS;
+
+	if (queue->length > max_elems)
 	{
 		trans = g_queue_pop_head(queue);
 		msn_transaction_destroy(trans);
============================================================
--- libpurple/protocols/msn/history.h	956cf58d7d7821e9e8cdf3d319e81205c351b994
+++ libpurple/protocols/msn/history.h	c68127fdb7b65bc8a43265e1843e9fc4814d07ae
@@ -24,7 +24,8 @@
 #ifndef _MSN_HISTORY_H
 #define _MSN_HISTORY_H
 
-#define MSN_HIST_ELEMS 0x30
+#define MSN_NS_HIST_ELEMS 0x300
+#define MSN_SB_HIST_ELEMS 0x30
 
 typedef struct _MsnHistory MsnHistory;
 


More information about the Commits mailing list