Mercurial > pidgin.yaz
comparison libpurple/protocols/yahoo/libymsg.c @ 29504:057372f5c319
propagate from branch 'im.pidgin.pidgin' (head bd59b6d44034a232a0414586f78d8f559d9705f8)
to branch 'im.pidgin.pidgin.next.minor' (head e3b29e5b831c5e0c79521e61160af19f21dae099)
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Sun, 27 Sep 2009 22:22:36 +0000 |
parents | 60e4ef6801ff 6e9917e067e6 |
children | 2cc15ca3c26d |
comparison
equal
deleted
inserted
replaced
28665:60e4ef6801ff | 29504:057372f5c319 |
---|---|
1687 int totalelements = 0; | 1687 int totalelements = 0; |
1688 int response_no = -1; | 1688 int response_no = -1; |
1689 char *crumb = NULL; | 1689 char *crumb = NULL; |
1690 char *crypt = NULL; | 1690 char *crypt = NULL; |
1691 | 1691 |
1692 #if GLIB_CHECK_VERSION(2,6,0) | |
1693 totalelements = g_strv_length(split_data); | 1692 totalelements = g_strv_length(split_data); |
1694 #else | 1693 |
1695 while (split_data[++totalelements] != NULL); | |
1696 #endif | |
1697 if (totalelements >= 4) { | 1694 if (totalelements >= 4) { |
1698 response_no = strtol(split_data[0], NULL, 10); | 1695 response_no = strtol(split_data[0], NULL, 10); |
1699 crumb = g_strdup(split_data[1] + strlen("crumb=")); | 1696 crumb = g_strdup(split_data[1] + strlen("crumb=")); |
1700 yd->cookie_y = g_strdup(split_data[2] + strlen("Y=")); | 1697 yd->cookie_y = g_strdup(split_data[2] + strlen("Y=")); |
1701 yd->cookie_t = g_strdup(split_data[3] + strlen("T=")); | 1698 yd->cookie_t = g_strdup(split_data[3] + strlen("T=")); |
1773 gchar **split_data = g_strsplit(ret_data, "\r\n", -1); | 1770 gchar **split_data = g_strsplit(ret_data, "\r\n", -1); |
1774 int totalelements = 0; | 1771 int totalelements = 0; |
1775 int response_no = -1; | 1772 int response_no = -1; |
1776 char *token = NULL; | 1773 char *token = NULL; |
1777 | 1774 |
1778 #if GLIB_CHECK_VERSION(2,6,0) | |
1779 totalelements = g_strv_length(split_data); | 1775 totalelements = g_strv_length(split_data); |
1780 #else | 1776 |
1781 while (split_data[++totalelements] != NULL); | |
1782 #endif | |
1783 if(totalelements == 1) | 1777 if(totalelements == 1) |
1784 response_no = strtol(split_data[0], NULL, 10); | 1778 response_no = strtol(split_data[0], NULL, 10); |
1785 else if(totalelements >= 2) { | 1779 else if(totalelements >= 2) { |
1786 response_no = strtol(split_data[0], NULL, 10); | 1780 response_no = strtol(split_data[0], NULL, 10); |
1787 token = g_strdup(split_data[1] + strlen("ymsgr=")); | 1781 token = g_strdup(split_data[1] + strlen("ymsgr=")); |