comparison libpurple/protocols/yahoo/libymsg.c @ 29623:3c9534e77ea1

propagate from branch 'im.pidgin.pidgin' (head 53ad409302bf312b4f1e4153f893f1350638c8c9) to branch 'im.pidgin.pidgin.next.minor' (head e36acc862ca620a7afc746236306cb0eba4ca37a)
author John Bailey <rekkanoryo@rekkanoryo.org>
date Mon, 02 Nov 2009 03:18:15 +0000
parents 99b9c9ee7363 e3206d6da6c7
children 7b1cfd48beab
comparison
equal deleted inserted replaced
28858:532307346255 29623:3c9534e77ea1
1762 int totalelements = 0; 1762 int totalelements = 0;
1763 int response_no = -1; 1763 int response_no = -1;
1764 char *crumb = NULL; 1764 char *crumb = NULL;
1765 char *crypt = NULL; 1765 char *crypt = NULL;
1766 1766
1767 #if GLIB_CHECK_VERSION(2,6,0)
1768 totalelements = g_strv_length(split_data); 1767 totalelements = g_strv_length(split_data);
1769 #else 1768
1770 while (split_data[++totalelements] != NULL);
1771 #endif
1772 if (totalelements >= 4) { 1769 if (totalelements >= 4) {
1773 response_no = strtol(split_data[0], NULL, 10); 1770 response_no = strtol(split_data[0], NULL, 10);
1774 crumb = g_strdup(split_data[1] + strlen("crumb=")); 1771 crumb = g_strdup(split_data[1] + strlen("crumb="));
1775 yd->cookie_y = g_strdup(split_data[2] + strlen("Y=")); 1772 yd->cookie_y = g_strdup(split_data[2] + strlen("Y="));
1776 yd->cookie_t = g_strdup(split_data[3] + strlen("T=")); 1773 yd->cookie_t = g_strdup(split_data[3] + strlen("T="));
1848 gchar **split_data = g_strsplit(ret_data, "\r\n", -1); 1845 gchar **split_data = g_strsplit(ret_data, "\r\n", -1);
1849 int totalelements = 0; 1846 int totalelements = 0;
1850 int response_no = -1; 1847 int response_no = -1;
1851 char *token = NULL; 1848 char *token = NULL;
1852 1849
1853 #if GLIB_CHECK_VERSION(2,6,0)
1854 totalelements = g_strv_length(split_data); 1850 totalelements = g_strv_length(split_data);
1855 #else 1851
1856 while (split_data[++totalelements] != NULL);
1857 #endif
1858 if(totalelements == 1) 1852 if(totalelements == 1)
1859 response_no = strtol(split_data[0], NULL, 10); 1853 response_no = strtol(split_data[0], NULL, 10);
1860 else if(totalelements >= 2) { 1854 else if(totalelements >= 2) {
1861 response_no = strtol(split_data[0], NULL, 10); 1855 response_no = strtol(split_data[0], NULL, 10);
1862 token = g_strdup(split_data[1] + strlen("ymsgr=")); 1856 token = g_strdup(split_data[1] + strlen("ymsgr="));