changeset 27351:fd52b7a547e4

In case of an error we do not receive the token, and totalelements in that case is 1. This fixes the issue of not being able to set error properly. I think that the change in code for proper processing of the chunked data created this issue.
author Sulabh Mahajan <sulabh@soc.pidgin.im>
date Fri, 03 Jul 2009 11:13:35 +0000
parents c0075538109b
children 074e14e4f88c
files libpurple/protocols/yahoo/yahoo.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo.c	Fri Jul 03 09:05:51 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo.c	Fri Jul 03 11:13:35 2009 +0000
@@ -1769,6 +1769,8 @@
 #else
 		while (split_data[++totalelements] != NULL);	
 #endif
+		if(totalelements == 1)
+			response_no = strtol(split_data[0], NULL, 10);
 		if(totalelements >= 2) {
 			response_no = strtol(split_data[0], NULL, 10);
 			token = g_strdup(split_data[1] + strlen("ymsgr="));