changeset 23575:9688908af52d

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.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 13 Jul 2008 04:55:39 +0000
parents 4162ac08c775
children aff6c3a192a8
files libpurple/protocols/msn/command.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/command.c	Sun Jul 13 04:48:05 2008 +0000
+++ b/libpurple/protocols/msn/command.c	Sun Jul 13 04:55:39 2008 +0000
@@ -51,14 +51,14 @@
 	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) {