changeset 27303:539f53b9ec37

Fix how we process certain data we get from the server. In some cases, we seem to take into account that the server does send us chunked data, but not always. Now that the core handles chunked data, we can process the response data more correctly.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 30 Jun 2009 20:50:33 +0000
parents 716bd29bdc28
children c5757ea836f2
files libpurple/protocols/yahoo/yahoo.c
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo.c	Tue Jun 30 20:48:12 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo.c	Tue Jun 30 20:50:33 2009 +0000
@@ -1683,11 +1683,11 @@
 #else
 		while (split_data[++totalelements] != NULL);	
 #endif
-		if (totalelements >= 5) {
-			response_no = strtol(split_data[1], NULL, 10);
-			crumb = g_strdup(split_data[2] + strlen("crumb="));
-			yd->cookie_y = g_strdup(split_data[3] + strlen("Y="));
-			yd->cookie_t = g_strdup(split_data[4] + strlen("T="));
+		if (totalelements >= 4) {
+			response_no = strtol(split_data[0], NULL, 10);
+			crumb = g_strdup(split_data[1] + strlen("crumb="));
+			yd->cookie_y = g_strdup(split_data[2] + strlen("Y="));
+			yd->cookie_t = g_strdup(split_data[3] + strlen("T="));
 		}
 
 		g_strfreev(split_data);
@@ -1769,9 +1769,9 @@
 #else
 		while (split_data[++totalelements] != NULL);	
 #endif
-		if(totalelements >= 5) {
-			response_no = strtol(split_data[1], NULL, 10);
-			token = g_strdup(split_data[2] + strlen("ymsgr="));
+		if(totalelements >= 2) {
+			response_no = strtol(split_data[0], NULL, 10);
+			token = g_strdup(split_data[1] + strlen("ymsgr="));
 		}
 
 		g_strfreev(split_data);