# HG changeset patch # User Sadrul Habib Chowdhury # Date 1246395033 0 # Node ID 539f53b9ec37e13a5ffdd104249bf95d7111c15b # Parent 716bd29bdc2899338cc4ee43f33063f3814a50d3 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. diff -r 716bd29bdc28 -r 539f53b9ec37 libpurple/protocols/yahoo/yahoo.c --- 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);