Mercurial > pidgin.yaz
comparison libpurple/protocols/yahoo/libymsg.c @ 29869:f44718de8b06
merged with im.pidgin.pidgin
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Mon, 22 Feb 2010 16:05:25 +0900 |
parents | d77ecfe2b2c9 2b9db39bd7ed |
children | 2292d8896b0b |
comparison
equal
deleted
inserted
replaced
29445:d74e3cd6cbb5 | 29869:f44718de8b06 |
---|---|
1123 m2 = purple_strreplace(m, "\r\n", "\n"); | 1123 m2 = purple_strreplace(m, "\r\n", "\n"); |
1124 g_free(m); | 1124 g_free(m); |
1125 m = m2; | 1125 m = m2; |
1126 purple_util_chrreplace(m, '\r', '\n'); | 1126 purple_util_chrreplace(m, '\r', '\n'); |
1127 if (!strcmp(m, "<ding>")) { | 1127 if (!strcmp(m, "<ding>")) { |
1128 PurpleConversation *conv = NULL; | |
1128 char *username; | 1129 char *username; |
1129 | 1130 |
1130 username = g_markup_escape_text(im->fed_from, -1); | 1131 username = g_markup_escape_text(im->fed_from, -1); |
1132 conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, | |
1133 username, account); | |
1131 purple_prpl_got_attention(gc, username, YAHOO_BUZZ); | 1134 purple_prpl_got_attention(gc, username, YAHOO_BUZZ); |
1132 g_free(username); | 1135 g_free(username); |
1133 g_free(m); | 1136 g_free(m); |
1134 g_free(im->fed_from); | 1137 g_free(im->fed_from); |
1135 g_free(im); | 1138 g_free(im); |
1777 int totalelements = 0; | 1780 int totalelements = 0; |
1778 int response_no = -1; | 1781 int response_no = -1; |
1779 char *crumb = NULL; | 1782 char *crumb = NULL; |
1780 char *crypt = NULL; | 1783 char *crypt = NULL; |
1781 | 1784 |
1782 #if GLIB_CHECK_VERSION(2,6,0) | |
1783 totalelements = g_strv_length(split_data); | 1785 totalelements = g_strv_length(split_data); |
1784 #else | 1786 |
1785 while (split_data[++totalelements] != NULL); | |
1786 #endif | |
1787 if (totalelements >= 4) { | 1787 if (totalelements >= 4) { |
1788 response_no = strtol(split_data[0], NULL, 10); | 1788 response_no = strtol(split_data[0], NULL, 10); |
1789 crumb = g_strdup(split_data[1] + strlen("crumb=")); | 1789 crumb = g_strdup(split_data[1] + strlen("crumb=")); |
1790 yd->cookie_y = g_strdup(split_data[2] + strlen("Y=")); | 1790 yd->cookie_y = g_strdup(split_data[2] + strlen("Y=")); |
1791 yd->cookie_t = g_strdup(split_data[3] + strlen("T=")); | 1791 yd->cookie_t = g_strdup(split_data[3] + strlen("T=")); |
1863 gchar **split_data = g_strsplit(ret_data, "\r\n", -1); | 1863 gchar **split_data = g_strsplit(ret_data, "\r\n", -1); |
1864 int totalelements = 0; | 1864 int totalelements = 0; |
1865 int response_no = -1; | 1865 int response_no = -1; |
1866 char *token = NULL; | 1866 char *token = NULL; |
1867 | 1867 |
1868 #if GLIB_CHECK_VERSION(2,6,0) | |
1869 totalelements = g_strv_length(split_data); | 1868 totalelements = g_strv_length(split_data); |
1870 #else | 1869 |
1871 while (split_data[++totalelements] != NULL); | |
1872 #endif | |
1873 if(totalelements == 1) | 1870 if(totalelements == 1) |
1874 response_no = strtol(split_data[0], NULL, 10); | 1871 response_no = strtol(split_data[0], NULL, 10); |
1875 else if(totalelements >= 2) { | 1872 else if(totalelements >= 2) { |
1876 response_no = strtol(split_data[0], NULL, 10); | 1873 response_no = strtol(split_data[0], NULL, 10); |
1877 token = g_strdup(split_data[1] + strlen("ymsgr=")); | 1874 token = g_strdup(split_data[1] + strlen("ymsgr=")); |