cpw.qulogic.msn: 39dae913: Workaround a bug in MSN servers where it...

qulogic at pidgin.im qulogic at pidgin.im
Sun Jul 13 01:50:55 EDT 2008


-----------------------------------------------------------------
Revision: 39dae91304474426adc73b91a449946ae914b788
Ancestor: 9e3c89d95f968aeb41336691e8dde96bd2996960
Author: qulogic at pidgin.im
Date: 2008-07-13T04:55:39
Branch: im.pidgin.cpw.qulogic.msn
URL: http://d.pidgin.im/viewmtn/revision/info/39dae91304474426adc73b91a449946ae914b788

Modified files:
        libpurple/protocols/msn/command.c

ChangeLog: 

Workaround a bug in MSN servers where it sends an extra space at the 
end of the ILN command. Also used g_strsplit_set so it doesn't 
accidentally drop command parameters when there are double spaces.

Fixes #6302.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/command.c	4fcae296d3a68be6c4e108944473b0b1f1038a16
+++ libpurple/protocols/msn/command.c	6b87cf6d057c7316c02d2bb0963d306c705903f6
@@ -51,14 +51,14 @@ msn_command_from_string(const char *stri
 	if (param_start)
 	{
 		*param_start++ = '\0';
-		cmd->params = g_strsplit(param_start, " ", 0);
+		cmd->params = g_strsplit_set(param_start, " ", 0);
 	}
 
 	if (cmd->params != NULL)
 	{
 		int c;
 
-		for (c = 0; cmd->params[c]; c++);
+		for (c = 0; cmd->params[c] && cmd->params[c][0]; c++);
 		cmd->param_count = c;
 
 		if (cmd->param_count) {


More information about the Commits mailing list