Tue, 06 May 2014 18:27:58 +0200
Merge release-2.x.y
| 9306 | 1 | /* |
| 15884 | 2 | * purple |
| 9306 | 3 | * |
| 15884 | 4 | * Purple is the legal property of its developers, whose names are too numerous |
| 9306 | 5 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 6 | * source distribution. | |
| 7 | * | |
| 8 | * This program is free software; you can redistribute it and/or modify | |
| 9 | * it under the terms of the GNU General Public License as published by | |
| 10 | * the Free Software Foundation; either version 2 of the License, or | |
| 11 | * (at your option) any later version. | |
| 12 | * | |
| 13 | * This program is distributed in the hope that it will be useful, | |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 | * GNU General Public License for more details. | |
| 17 | * | |
| 18 | * You should have received a copy of the GNU General Public License | |
| 19 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18552
diff
changeset
|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 9306 | 21 | * |
| 22 | */ | |
| 23 | ||
| 24 | #include "internal.h" | |
| 25 | ||
| 26 | #include "account.h" | |
| 27 | #include "accountopt.h" | |
|
34706
02cb08146888
Renamed blist.[ch] to buddylist.[ch]
Ankit Vani <a@nevitus.org>
parents:
34703
diff
changeset
|
28 | #include "buddylist.h" |
| 9306 | 29 | #include "debug.h" |
|
34227
6d016a081401
HTTP: migrate purple_util_fetch_url to new API for prpls
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33892
diff
changeset
|
30 | #include "http.h" |
| 9306 | 31 | #include "prpl.h" |
| 32 | #include "proxy.h" | |
| 33 | #include "util.h" | |
| 34 | ||
|
27555
afb7cb5c350c
Update for file renames.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
27467
diff
changeset
|
35 | #include "libymsg.h" |
| 10392 | 36 | #include "yahoo_packet.h" |
| 9306 | 37 | #include "yahoo_friend.h" |
| 38 | #include "yahoo_picture.h" | |
| 39 | ||
| 40 | ||
| 41 | struct yahoo_fetch_picture_data { | |
| 15884 | 42 | PurpleConnection *gc; |
| 9306 | 43 | char *who; |
| 44 | int checksum; | |
| 45 | }; | |
| 46 | ||
|
14416
c95ffd983a39
[gaim-migrate @ 17060]
Mark Doliner <markdoliner@pidgin.im>
parents:
14321
diff
changeset
|
47 | static void |
|
34227
6d016a081401
HTTP: migrate purple_util_fetch_url to new API for prpls
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33892
diff
changeset
|
48 | yahoo_fetch_picture_cb(PurpleHttpConnection *http_conn, PurpleHttpResponse *response, |
|
6d016a081401
HTTP: migrate purple_util_fetch_url to new API for prpls
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33892
diff
changeset
|
49 | gpointer _data) |
| 9306 | 50 | { |
|
34227
6d016a081401
HTTP: migrate purple_util_fetch_url to new API for prpls
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33892
diff
changeset
|
51 | struct yahoo_fetch_picture_data *d = _data; |
| 9306 | 52 | |
|
34287
6cd0c77b1f6a
HTTP: successful is spelled with one l
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34286
diff
changeset
|
53 | if (!purple_http_response_is_successful(response)) { |
|
34227
6d016a081401
HTTP: migrate purple_util_fetch_url to new API for prpls
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33892
diff
changeset
|
54 | purple_debug_error("yahoo", "Fetching buddy icon failed: %s\n", |
|
6d016a081401
HTTP: migrate purple_util_fetch_url to new API for prpls
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33892
diff
changeset
|
55 | purple_http_response_get_error(response)); |
|
14416
c95ffd983a39
[gaim-migrate @ 17060]
Mark Doliner <markdoliner@pidgin.im>
parents:
14321
diff
changeset
|
56 | } else { |
|
16534
2ab9e23f99d9
Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@pidgin.im>
parents:
16076
diff
changeset
|
57 | char *checksum = g_strdup_printf("%i", d->checksum); |
|
34227
6d016a081401
HTTP: migrate purple_util_fetch_url to new API for prpls
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33892
diff
changeset
|
58 | const gchar *pic_data; |
|
6d016a081401
HTTP: migrate purple_util_fetch_url to new API for prpls
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33892
diff
changeset
|
59 | size_t pic_len; |
|
6d016a081401
HTTP: migrate purple_util_fetch_url to new API for prpls
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33892
diff
changeset
|
60 | |
|
6d016a081401
HTTP: migrate purple_util_fetch_url to new API for prpls
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33892
diff
changeset
|
61 | pic_data = purple_http_response_get_data(response, &pic_len); |
|
6d016a081401
HTTP: migrate purple_util_fetch_url to new API for prpls
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33892
diff
changeset
|
62 | |
|
6d016a081401
HTTP: migrate purple_util_fetch_url to new API for prpls
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33892
diff
changeset
|
63 | purple_buddy_icons_set_for_user( |
|
6d016a081401
HTTP: migrate purple_util_fetch_url to new API for prpls
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33892
diff
changeset
|
64 | purple_connection_get_account(d->gc), d->who, |
|
6d016a081401
HTTP: migrate purple_util_fetch_url to new API for prpls
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33892
diff
changeset
|
65 | g_memdup(pic_data, pic_len), pic_len, checksum); |
|
16534
2ab9e23f99d9
Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@pidgin.im>
parents:
16076
diff
changeset
|
66 | g_free(checksum); |
| 9306 | 67 | } |
| 68 | ||
| 69 | g_free(d->who); | |
| 70 | g_free(d); | |
| 71 | } | |
| 72 | ||
| 15884 | 73 | void yahoo_process_picture(PurpleConnection *gc, struct yahoo_packet *pkt) |
| 9306 | 74 | { |
|
27959
f842ae57da4e
Move from "struct yahoo_data" to "YahooData" to be consistent with other structs
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
27958
diff
changeset
|
75 | YahooData *yd; |
| 9306 | 76 | GSList *l = pkt->hash; |
|
35983
029ab6fae0e6
Backport more warning fixes for prpls from default
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35259
diff
changeset
|
77 | char *who = NULL; |
| 9306 | 78 | gboolean got_icon_info = FALSE, send_icon_info = FALSE; |
| 79 | char *url = NULL; | |
| 80 | int checksum = 0; | |
| 81 | ||
| 82 | while (l) { | |
| 83 | struct yahoo_pair *pair = l->data; | |
| 84 | ||
| 85 | switch (pair->key) { | |
| 86 | case 1: | |
| 87 | case 4: | |
|
35259
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
88 | if (g_utf8_validate(pair->value, -1, NULL)) { |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
89 | who = pair->value; |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
90 | } else { |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
91 | purple_debug_warning("yahoo", "yahoo_process_picture " |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
92 | "got non-UTF-8 string for key %d\n", pair->key); |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
93 | } |
| 9306 | 94 | break; |
|
35983
029ab6fae0e6
Backport more warning fixes for prpls from default
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35259
diff
changeset
|
95 | case 5: /* us */ |
| 9306 | 96 | break; |
| 97 | case 13: { | |
| 98 | int tmp; | |
| 99 | tmp = strtol(pair->value, NULL, 10); | |
| 100 | if (tmp == 1) { | |
| 101 | send_icon_info = TRUE; | |
| 102 | } else if (tmp == 2) { | |
| 103 | got_icon_info = TRUE; | |
| 104 | } | |
| 105 | break; | |
| 106 | } | |
| 107 | case 20: | |
|
35259
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
108 | if (g_utf8_validate(pair->value, -1, NULL)) { |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
109 | url = pair->value; |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
110 | } else { |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
111 | purple_debug_warning("yahoo", "yahoo_process_picture " |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
112 | "got non-UTF-8 string for key %d\n", pair->key); |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
113 | } |
| 9306 | 114 | break; |
| 115 | case 192: | |
| 116 | checksum = strtol(pair->value, NULL, 10); | |
| 117 | break; | |
| 118 | } | |
| 119 | ||
| 120 | l = l->next; | |
| 121 | } | |
| 122 | ||
|
27400
d8c31c7e084d
This should prevent pidgin from crashing, as reported by the ticket #9426.
Sulabh Mahajan <sulabh@pidgin.im>
parents:
27361
diff
changeset
|
123 | if (!who) |
|
d8c31c7e084d
This should prevent pidgin from crashing, as reported by the ticket #9426.
Sulabh Mahajan <sulabh@pidgin.im>
parents:
27361
diff
changeset
|
124 | return; |
|
d8c31c7e084d
This should prevent pidgin from crashing, as reported by the ticket #9426.
Sulabh Mahajan <sulabh@pidgin.im>
parents:
27361
diff
changeset
|
125 | |
|
34578
cfb2f856a5d0
Refactored prpls according to the changed PurpleAccount API
Ankit Vani <a@nevitus.org>
parents:
33892
diff
changeset
|
126 | if (!purple_account_privacy_check(purple_connection_get_account(gc), who)) { |
|
23960
e57706b32d2a
Patch from "Chris G." to extend the yahoo privacy to picture requests to help
Daniel Atallah <datallah@pidgin.im>
parents:
23181
diff
changeset
|
127 | purple_debug_info("yahoo", "Picture packet from %s dropped.\n", who); |
|
e57706b32d2a
Patch from "Chris G." to extend the yahoo privacy to picture requests to help
Daniel Atallah <datallah@pidgin.im>
parents:
23181
diff
changeset
|
128 | return; |
|
e57706b32d2a
Patch from "Chris G." to extend the yahoo privacy to picture requests to help
Daniel Atallah <datallah@pidgin.im>
parents:
23181
diff
changeset
|
129 | } |
|
e57706b32d2a
Patch from "Chris G." to extend the yahoo privacy to picture requests to help
Daniel Atallah <datallah@pidgin.im>
parents:
23181
diff
changeset
|
130 | |
|
9675
127db3bbb4f2
[gaim-migrate @ 10527]
Peter Lawler <pidgin@bleeter.id.au>
parents:
9329
diff
changeset
|
131 | /* Yahoo IM 6 spits out 0.png as the URL if the buddy icon is not set */ |
|
18552
810a338ef085
Use the glib strcasecmp functions everywhere, as we've had reports of
Richard Laager <rlaager@pidgin.im>
parents:
17151
diff
changeset
|
132 | if (who && got_icon_info && url && !g_ascii_strncasecmp(url, "http://", 7)) { |
| 9306 | 133 | /* TODO: make this work p2p, try p2p before the url */ |
| 134 | struct yahoo_fetch_picture_data *data; | |
|
16534
2ab9e23f99d9
Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@pidgin.im>
parents:
16076
diff
changeset
|
135 | |
| 9306 | 136 | data = g_new0(struct yahoo_fetch_picture_data, 1); |
| 137 | data->gc = gc; | |
| 138 | data->who = g_strdup(who); | |
| 139 | data->checksum = checksum; | |
|
34227
6d016a081401
HTTP: migrate purple_util_fetch_url to new API for prpls
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33892
diff
changeset
|
140 | yd = purple_connection_get_protocol_data(gc); |
|
34269
26b4c9a54166
HTTP: Use PurpleHttpConnectionSet instead of GSLists of PurpleHttpConnection structs
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34235
diff
changeset
|
141 | purple_http_connection_set_add(yd->http_reqs, purple_http_get( |
|
26b4c9a54166
HTTP: Use PurpleHttpConnectionSet instead of GSLists of PurpleHttpConnection structs
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34235
diff
changeset
|
142 | gc, yahoo_fetch_picture_cb, data, url)); |
| 9306 | 143 | } else if (who && send_icon_info) { |
| 144 | yahoo_send_picture_info(gc, who); | |
| 145 | } | |
| 146 | } | |
| 147 | ||
| 15884 | 148 | void yahoo_process_picture_checksum(PurpleConnection *gc, struct yahoo_packet *pkt) |
| 9306 | 149 | { |
| 150 | GSList *l = pkt->hash; | |
| 151 | char *who = NULL; | |
| 152 | int checksum = 0; | |
| 153 | ||
| 154 | while (l) { | |
| 155 | struct yahoo_pair *pair = l->data; | |
| 156 | ||
| 157 | switch (pair->key) { | |
| 158 | case 4: | |
|
35259
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
159 | if (g_utf8_validate(pair->value, -1, NULL)) { |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
160 | who = pair->value; |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
161 | } else { |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
162 | purple_debug_warning("yahoo", "yahoo_process_picture_checksum " |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
163 | "got non-UTF-8 string for key %d\n", pair->key); |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
164 | } |
| 9306 | 165 | break; |
| 166 | case 5: | |
| 167 | /* us */ | |
| 168 | break; | |
| 169 | case 192: | |
| 170 | checksum = strtol(pair->value, NULL, 10); | |
| 171 | break; | |
| 172 | } | |
| 173 | l = l->next; | |
| 174 | } | |
| 175 | ||
| 176 | if (who) { | |
|
34728
8efd73063ecf
Renamed buddy list functions to more appropriate/simler names.
Ankit Vani <a@nevitus.org>
parents:
34706
diff
changeset
|
177 | PurpleBuddy *b = purple_blist_find_buddy(purple_connection_get_account(gc), who); |
|
16606
b31fca4f6f60
Thanks to Bleeter, yahoo will not crash for non-existent buddyicons anymore.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16539
diff
changeset
|
178 | const char *locksum = NULL; |
|
16534
2ab9e23f99d9
Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@pidgin.im>
parents:
16076
diff
changeset
|
179 | |
|
2ab9e23f99d9
Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@pidgin.im>
parents:
16076
diff
changeset
|
180 | /* FIXME: Cleanup this strtol() stuff if possible. */ |
|
17151
7d28dd13c4db
Patch #1038. Fix receiving of Yahoo buddy icons. Thanks, vampire!
Sean Egan <seanegan@pidgin.im>
parents:
16757
diff
changeset
|
181 | if (b) { |
|
7d28dd13c4db
Patch #1038. Fix receiving of Yahoo buddy icons. Thanks, vampire!
Sean Egan <seanegan@pidgin.im>
parents:
16757
diff
changeset
|
182 | locksum = purple_buddy_icons_get_checksum_for_user(b); |
|
7d28dd13c4db
Patch #1038. Fix receiving of Yahoo buddy icons. Thanks, vampire!
Sean Egan <seanegan@pidgin.im>
parents:
16757
diff
changeset
|
183 | if (!locksum || (checksum != strtol(locksum, NULL, 10))) |
|
7d28dd13c4db
Patch #1038. Fix receiving of Yahoo buddy icons. Thanks, vampire!
Sean Egan <seanegan@pidgin.im>
parents:
16757
diff
changeset
|
184 | yahoo_send_picture_request(gc, who); |
|
7d28dd13c4db
Patch #1038. Fix receiving of Yahoo buddy icons. Thanks, vampire!
Sean Egan <seanegan@pidgin.im>
parents:
16757
diff
changeset
|
185 | } |
| 9306 | 186 | } |
| 187 | } | |
| 188 | ||
| 15884 | 189 | void yahoo_process_picture_upload(PurpleConnection *gc, struct yahoo_packet *pkt) |
| 9306 | 190 | { |
| 15884 | 191 | PurpleAccount *account = purple_connection_get_account(gc); |
|
32280
704f84f692f6
Convert yahoo prpl to use accessor functions purple_connection_get_protocol_data() and purple_connection_set_protocol_data()
Andrew Victor <andrew.victor@mxit.com>
parents:
27959
diff
changeset
|
192 | YahooData *yd = purple_connection_get_protocol_data(gc); |
| 9306 | 193 | GSList *l = pkt->hash; |
| 194 | char *url = NULL; | |
| 195 | ||
| 196 | while (l) { | |
| 197 | struct yahoo_pair *pair = l->data; | |
| 198 | ||
| 199 | switch (pair->key) { | |
| 200 | case 5: | |
| 201 | /* us */ | |
| 202 | break; | |
| 203 | case 27: | |
| 204 | /* filename on our computer. */ | |
| 205 | break; | |
| 206 | case 20: /* url at yahoo */ | |
|
35259
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
207 | if (g_utf8_validate(pair->value, -1, NULL)) { |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
208 | url = pair->value; |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
209 | } else { |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
210 | purple_debug_warning("yahoo", "yahoo_process_picture_upload " |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
211 | "got non-UTF-8 string for key %d\n", pair->key); |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
212 | } |
| 9306 | 213 | case 38: /* timestamp */ |
| 214 | break; | |
| 215 | } | |
| 216 | l = l->next; | |
| 217 | } | |
| 218 | ||
| 219 | if (url) { | |
|
23170
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
220 | g_free(yd->picture_url); |
| 9306 | 221 | yd->picture_url = g_strdup(url); |
| 15884 | 222 | purple_account_set_string(account, YAHOO_PICURL_SETTING, url); |
| 223 | purple_account_set_int(account, YAHOO_PICCKSUM_SETTING, yd->picture_checksum); | |
|
23170
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
224 | yahoo_send_picture_checksum(gc); |
| 9310 | 225 | yahoo_send_picture_update(gc, 2); |
| 9306 | 226 | } |
| 227 | } | |
| 228 | ||
| 15884 | 229 | void yahoo_process_avatar_update(PurpleConnection *gc, struct yahoo_packet *pkt) |
|
14030
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
230 | { |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
231 | GSList *l = pkt->hash; |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
232 | char *who = NULL; |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
233 | int avatar = 0; |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
234 | |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
235 | while (l) { |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
236 | struct yahoo_pair *pair = l->data; |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
237 | |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
238 | switch (pair->key) { |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
239 | case 4: |
|
35259
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
240 | if (g_utf8_validate(pair->value, -1, NULL)) { |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
241 | who = pair->value; |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
242 | } else { |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
243 | purple_debug_warning("yahoo", "yahoo_process_avatar_upload " |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
244 | "got non-UTF-8 string for key %d\n", pair->key); |
|
b0345c25f886
Validate incoming Yahoo strings as UTF-8 before using them.
Mark Doliner <mark@kingant.net>
parents:
33102
diff
changeset
|
245 | } |
|
14030
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
246 | break; |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
247 | case 5: |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
248 | /* us */ |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
249 | break; |
|
27467
5fd6936c4ed7
Some more fixes for when unsetting buddy picture, for both when sending and receiving updates.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
27413
diff
changeset
|
250 | case 206: /* Older versions. Still needed? */ |
|
5fd6936c4ed7
Some more fixes for when unsetting buddy picture, for both when sending and receiving updates.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
27413
diff
changeset
|
251 | case 213: /* Newer versions */ |
|
14030
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
252 | /* |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
253 | * 0 - No icon or avatar |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
254 | * 1 - Using an avatar |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
255 | * 2 - Using an icon |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
256 | */ |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
257 | avatar = strtol(pair->value, NULL, 10); |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
258 | break; |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
259 | } |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
260 | l = l->next; |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
261 | } |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
262 | |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
263 | if (who) { |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
264 | if (avatar == 2) |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
265 | yahoo_send_picture_request(gc, who); |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
266 | else if ((avatar == 0) || (avatar == 1)) { |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
267 | YahooFriend *f; |
|
32678
01f6312a4a7b
On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents:
32596
diff
changeset
|
268 | purple_buddy_icons_set_for_user(purple_connection_get_account(gc), who, NULL, 0, NULL); |
|
14030
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
269 | if ((f = yahoo_friend_find(gc, who))) |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
270 | yahoo_friend_set_buddy_icon_need_request(f, TRUE); |
| 15884 | 271 | purple_debug_misc("yahoo", "Setting user %s's icon to NULL.\n", who); |
|
14030
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
272 | } |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
273 | } |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
274 | } |
|
23144f1dc950
[gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents:
13277
diff
changeset
|
275 | |
| 15884 | 276 | void yahoo_send_picture_info(PurpleConnection *gc, const char *who) |
| 9322 | 277 | { |
|
32280
704f84f692f6
Convert yahoo prpl to use accessor functions purple_connection_get_protocol_data() and purple_connection_set_protocol_data()
Andrew Victor <andrew.victor@mxit.com>
parents:
27959
diff
changeset
|
278 | YahooData *yd = purple_connection_get_protocol_data(gc); |
| 9322 | 279 | struct yahoo_packet *pkt; |
| 280 | ||
| 9329 | 281 | if (!yd->picture_url) { |
| 15884 | 282 | purple_debug_warning("yahoo", "Attempted to send picture info without a picture\n"); |
| 9322 | 283 | return; |
| 9329 | 284 | } |
| 9322 | 285 | |
|
27866
4a8d47263e98
Change a bunch more of our yahoo packets to use the session ID. I believe this
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
27555
diff
changeset
|
286 | pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE, YAHOO_STATUS_AVAILABLE, yd->session_id); |
|
27413
2c10bbbac69c
This fixes sending updates to buddies when I change my pic.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
27412
diff
changeset
|
287 | yahoo_packet_hash(pkt, "ssssi", 1, purple_connection_get_display_name(gc), |
|
2c10bbbac69c
This fixes sending updates to buddies when I change my pic.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
27412
diff
changeset
|
288 | 5, who, |
| 10394 | 289 | 13, "2", 20, yd->picture_url, 192, yd->picture_checksum); |
| 10392 | 290 | yahoo_packet_send_and_free(pkt, yd); |
| 9322 | 291 | } |
| 9306 | 292 | |
| 15884 | 293 | void yahoo_send_picture_request(PurpleConnection *gc, const char *who) |
| 9306 | 294 | { |
|
32280
704f84f692f6
Convert yahoo prpl to use accessor functions purple_connection_get_protocol_data() and purple_connection_set_protocol_data()
Andrew Victor <andrew.victor@mxit.com>
parents:
27959
diff
changeset
|
295 | YahooData *yd = purple_connection_get_protocol_data(gc); |
| 9306 | 296 | struct yahoo_packet *pkt; |
| 297 | ||
|
27866
4a8d47263e98
Change a bunch more of our yahoo packets to use the session ID. I believe this
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
27555
diff
changeset
|
298 | pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE, YAHOO_STATUS_AVAILABLE, yd->session_id); |
|
27412
1db60cfcad9b
This fixes buddyicon fetches for me.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
27409
diff
changeset
|
299 | yahoo_packet_hash_str(pkt, 1, purple_connection_get_display_name(gc)); /* me */ |
| 10394 | 300 | yahoo_packet_hash_str(pkt, 5, who); /* the other guy */ |
| 301 | yahoo_packet_hash_str(pkt, 13, "1"); /* 1 = request, 2 = reply */ | |
| 10392 | 302 | yahoo_packet_send_and_free(pkt, yd); |
| 9306 | 303 | } |
| 304 | ||
| 15884 | 305 | void yahoo_send_picture_checksum(PurpleConnection *gc) |
| 9310 | 306 | { |
|
32280
704f84f692f6
Convert yahoo prpl to use accessor functions purple_connection_get_protocol_data() and purple_connection_set_protocol_data()
Andrew Victor <andrew.victor@mxit.com>
parents:
27959
diff
changeset
|
307 | YahooData *yd = purple_connection_get_protocol_data(gc); |
| 9310 | 308 | struct yahoo_packet *pkt; |
| 309 | ||
|
27866
4a8d47263e98
Change a bunch more of our yahoo packets to use the session ID. I believe this
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
27555
diff
changeset
|
310 | pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE_CHECKSUM, YAHOO_STATUS_AVAILABLE, yd->session_id); |
| 15884 | 311 | yahoo_packet_hash(pkt, "ssi", 1, purple_connection_get_display_name(gc), |
| 10394 | 312 | 212, "1", 192, yd->picture_checksum); |
| 10392 | 313 | yahoo_packet_send_and_free(pkt, yd); |
| 9310 | 314 | } |
| 315 | ||
| 15884 | 316 | void yahoo_send_picture_update_to_user(PurpleConnection *gc, const char *who, int type) |
| 9310 | 317 | { |
|
32280
704f84f692f6
Convert yahoo prpl to use accessor functions purple_connection_get_protocol_data() and purple_connection_set_protocol_data()
Andrew Victor <andrew.victor@mxit.com>
parents:
27959
diff
changeset
|
318 | YahooData *yd = purple_connection_get_protocol_data(gc); |
| 9310 | 319 | struct yahoo_packet *pkt; |
| 320 | ||
|
27866
4a8d47263e98
Change a bunch more of our yahoo packets to use the session ID. I believe this
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
27555
diff
changeset
|
321 | pkt = yahoo_packet_new(YAHOO_SERVICE_AVATAR_UPDATE, YAHOO_STATUS_AVAILABLE, yd->session_id); |
|
27467
5fd6936c4ed7
Some more fixes for when unsetting buddy picture, for both when sending and receiving updates.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
27413
diff
changeset
|
322 | yahoo_packet_hash(pkt, "si", 3, who, 213, type); |
| 10392 | 323 | yahoo_packet_send_and_free(pkt, yd); |
| 9310 | 324 | } |
| 325 | ||
| 326 | struct yspufe { | |
| 15884 | 327 | PurpleConnection *gc; |
| 9310 | 328 | int type; |
| 329 | }; | |
| 330 | ||
| 331 | static void yahoo_send_picture_update_foreach(gpointer key, gpointer value, gpointer data) | |
| 332 | { | |
|
15239
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
333 | const char *who = key; |
| 9310 | 334 | YahooFriend *f = value; |
| 335 | struct yspufe *d = data; | |
| 336 | ||
| 337 | if (f->status != YAHOO_STATUS_OFFLINE) | |
| 338 | yahoo_send_picture_update_to_user(d->gc, who, d->type); | |
| 339 | } | |
| 340 | ||
| 15884 | 341 | void yahoo_send_picture_update(PurpleConnection *gc, int type) |
| 9310 | 342 | { |
|
32280
704f84f692f6
Convert yahoo prpl to use accessor functions purple_connection_get_protocol_data() and purple_connection_set_protocol_data()
Andrew Victor <andrew.victor@mxit.com>
parents:
27959
diff
changeset
|
343 | YahooData *yd = purple_connection_get_protocol_data(gc); |
| 9310 | 344 | struct yspufe data; |
| 345 | ||
| 346 | data.gc = gc; | |
| 347 | data.type = type; | |
| 348 | ||
| 349 | g_hash_table_foreach(yd->friends, yahoo_send_picture_update_foreach, &data); | |
| 350 | } | |
| 351 | ||
| 9306 | 352 | void yahoo_buddy_icon_upload_data_free(struct yahoo_buddy_icon_upload_data *d) |
| 353 | { | |
| 15884 | 354 | purple_debug_misc("yahoo", "In yahoo_buddy_icon_upload_data_free()\n"); |
| 9306 | 355 | |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
356 | if (d->picture_data) |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
357 | g_string_free(d->picture_data, TRUE); |
|
13201
8c224ef70efa
[gaim-migrate @ 15563]
Daniel Atallah <datallah@pidgin.im>
parents:
12412
diff
changeset
|
358 | g_free(d->filename); |
| 9306 | 359 | g_free(d); |
| 360 | } | |
| 361 | ||
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
362 | static void |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
363 | yahoo_buddy_icon_upload_done(PurpleHttpConnection *http_conn, |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
364 | PurpleHttpResponse *response, gpointer _d) |
| 9306 | 365 | { |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
366 | struct yahoo_buddy_icon_upload_data *d = _d; |
| 15884 | 367 | PurpleConnection *gc = d->gc; |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
368 | YahooData *yd = purple_connection_get_protocol_data(gc); |
| 9306 | 369 | |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
370 | yd->picture_upload_hc = NULL; |
|
13201
8c224ef70efa
[gaim-migrate @ 15563]
Daniel Atallah <datallah@pidgin.im>
parents:
12412
diff
changeset
|
371 | |
|
34287
6cd0c77b1f6a
HTTP: successful is spelled with one l
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34286
diff
changeset
|
372 | if (!purple_http_response_is_successful(response)) |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
373 | purple_debug_info("yahoo", "Error uploading buddy icon.\n"); |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
374 | else |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
375 | purple_debug_misc("yahoo", "Finished uploading buddy icon.\n"); |
|
23170
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
376 | |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
377 | yahoo_buddy_icon_upload_data_free(d); |
| 9306 | 378 | } |
| 379 | ||
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
380 | static void |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
381 | yahoo_buddy_icon_build_packet(struct yahoo_buddy_icon_upload_data *d) |
| 9306 | 382 | { |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
383 | struct yahoo_packet *pkt; |
| 15884 | 384 | PurpleConnection *gc = d->gc; |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
385 | YahooData *yd = purple_connection_get_protocol_data(gc); |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
386 | gchar *len_str; |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
387 | guchar *pkt_buf; |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
388 | gsize pkt_buf_len; |
| 9306 | 389 | |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
390 | pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE_UPLOAD, |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
391 | YAHOO_STATUS_AVAILABLE, yd->session_id); |
| 9306 | 392 | |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
393 | len_str = g_strdup_printf("%" G_GSIZE_FORMAT, d->picture_data->len); |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
394 | /* 1 = me, 38 = expire time(?), 0 = me, 28 = size, 27 = filename, |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
395 | * 14 = NULL, 29 = data |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
396 | */ |
| 15884 | 397 | yahoo_packet_hash_str(pkt, 1, purple_connection_get_display_name(gc)); |
| 10394 | 398 | yahoo_packet_hash_str(pkt, 38, "604800"); /* time til expire */ |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
399 | purple_account_set_int(purple_connection_get_account(gc), |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
400 | YAHOO_PICEXPIRE_SETTING, time(NULL) + 604800); |
| 15884 | 401 | yahoo_packet_hash_str(pkt, 0, purple_connection_get_display_name(gc)); |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
402 | yahoo_packet_hash_str(pkt, 28, len_str); |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
403 | g_free(len_str); |
| 10394 | 404 | yahoo_packet_hash_str(pkt, 27, d->filename); |
| 405 | yahoo_packet_hash_str(pkt, 14, ""); | |
|
23170
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
406 | /* 4 padding for the 29 key name */ |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
407 | pkt_buf_len = yahoo_packet_build(pkt, 4, FALSE, yd->jp, &pkt_buf); |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
408 | yahoo_packet_free(pkt); |
| 9306 | 409 | |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
410 | /* There's no magic here, we just need to prepend in reverse order */ |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
411 | g_string_prepend(d->picture_data, "29\xc0\x80"); |
|
13201
8c224ef70efa
[gaim-migrate @ 15563]
Daniel Atallah <datallah@pidgin.im>
parents:
12412
diff
changeset
|
412 | |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
413 | g_string_prepend_len(d->picture_data, (char *)pkt_buf, pkt_buf_len); |
|
13201
8c224ef70efa
[gaim-migrate @ 15563]
Daniel Atallah <datallah@pidgin.im>
parents:
12412
diff
changeset
|
414 | g_free(pkt_buf); |
| 9306 | 415 | } |
| 416 | ||
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
417 | void |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
418 | yahoo_buddy_icon_upload(PurpleConnection *gc, |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
419 | struct yahoo_buddy_icon_upload_data *d) |
| 9306 | 420 | { |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
421 | PurpleHttpRequest *req; |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
422 | PurpleHttpCookieJar *cjar; |
| 15884 | 423 | PurpleAccount *account = purple_connection_get_account(gc); |
|
32280
704f84f692f6
Convert yahoo prpl to use accessor functions purple_connection_get_protocol_data() and purple_connection_set_protocol_data()
Andrew Victor <andrew.victor@mxit.com>
parents:
27959
diff
changeset
|
424 | YahooData *yd = purple_connection_get_protocol_data(gc); |
| 9306 | 425 | |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
426 | /* Cancel any in-progress buddy icon upload */ |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
427 | purple_http_conn_cancel(yd->picture_upload_hc); |
|
14693
9e3d4f9609e1
[gaim-migrate @ 17377]
Evan Schoenberg <evands@pidgin.im>
parents:
14686
diff
changeset
|
428 | |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
429 | req = purple_http_request_new(NULL); |
|
34286
8d0979967d05
HTTP: removing extra yahoo HTTP implementations - file transfer (and small improvements to libpurple http and ft code)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34285
diff
changeset
|
430 | purple_http_request_set_url_printf(req, "http://%s/notifyft", |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
431 | purple_account_get_string(account, "xfer_host", yd->jp ? |
|
34286
8d0979967d05
HTTP: removing extra yahoo HTTP implementations - file transfer (and small improvements to libpurple http and ft code)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34285
diff
changeset
|
432 | YAHOOJP_XFER_HOST : YAHOO_XFER_HOST)); |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
433 | purple_http_request_set_method(req, "POST"); |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
434 | cjar = purple_http_request_get_cookie_jar(req); |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
435 | purple_http_cookie_jar_set(cjar, "T", yd->cookie_t); |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
436 | purple_http_cookie_jar_set(cjar, "Y", yd->cookie_y); |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
437 | purple_http_request_header_set(req, "Cache-Control", "no-cache"); |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
438 | purple_http_request_header_set(req, "User-Agent", |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
439 | YAHOO_CLIENT_USERAGENT); |
|
14693
9e3d4f9609e1
[gaim-migrate @ 17377]
Evan Schoenberg <evands@pidgin.im>
parents:
14686
diff
changeset
|
440 | |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
441 | yahoo_buddy_icon_build_packet(d); |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
442 | purple_http_request_set_contents(req, d->picture_data->str, |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
443 | d->picture_data->len); |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
444 | g_string_free(d->picture_data, TRUE); |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
445 | d->picture_data = NULL; |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
446 | |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
447 | yd->picture_upload_hc = purple_http_request(gc, req, |
|
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
448 | yahoo_buddy_icon_upload_done, d); |
| 9306 | 449 | } |
| 450 | ||
|
23170
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
451 | static int yahoo_buddy_icon_calculate_checksum(const guchar *data, gsize len) |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
452 | { |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
453 | /* This code is borrowed from Kopete, which seems to be managing to calculate |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
454 | checksums in such a manner that Yahoo!'s servers are happy */ |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
455 | |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
456 | const guchar *p = data; |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
457 | int checksum = 0, g, i = len; |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
458 | |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
459 | while(i--) { |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
460 | checksum = (checksum << 4) + *p++; |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
461 | |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
462 | if((g = (checksum & 0xf0000000)) != 0) |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
463 | checksum ^= g >> 23; |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
464 | |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
465 | checksum &= ~g; |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
466 | } |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
467 | |
|
25895
ab35a3dda3c5
Add a newline to this log message
Mark Doliner <markdoliner@pidgin.im>
parents:
25152
diff
changeset
|
468 | purple_debug_misc("yahoo", "Calculated buddy icon checksum: %d\n", checksum); |
|
23170
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
469 | |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
470 | return checksum; |
|
27335
06a805d4e690
Strip trailing whitespace and comment #endif marcos that close #ifdef macros
Mark Doliner <markdoliner@pidgin.im>
parents:
27052
diff
changeset
|
471 | } |
|
23170
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
472 | |
|
35834
5eb0ba6d126d
imgstore: unref yahoo
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35265
diff
changeset
|
473 | void yahoo_set_buddy_icon(PurpleConnection *gc, PurpleImage *img) |
| 9306 | 474 | { |
|
32280
704f84f692f6
Convert yahoo prpl to use accessor functions purple_connection_get_protocol_data() and purple_connection_set_protocol_data()
Andrew Victor <andrew.victor@mxit.com>
parents:
27959
diff
changeset
|
475 | YahooData *yd = purple_connection_get_protocol_data(gc); |
|
32678
01f6312a4a7b
On the way to hiding the PurpleConnection struct.
Andrew Victor <andrew.victor@mxit.com>
parents:
32596
diff
changeset
|
476 | PurpleAccount *account = purple_connection_get_account(gc); |
| 9306 | 477 | |
|
16538
c7e61e2917c9
Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@pidgin.im>
parents:
16534
diff
changeset
|
478 | if (img == NULL) { |
|
15239
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
479 | g_free(yd->picture_url); |
| 9306 | 480 | yd->picture_url = NULL; |
| 481 | ||
|
23170
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
482 | /* TODO: don't we have to clear it on the server too?! */ |
|
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
483 | |
| 15884 | 484 | purple_account_set_string(account, YAHOO_PICURL_SETTING, NULL); |
| 485 | purple_account_set_int(account, YAHOO_PICCKSUM_SETTING, 0); | |
| 486 | purple_account_set_int(account, YAHOO_PICEXPIRE_SETTING, 0); | |
| 9310 | 487 | if (yd->logged_in) |
|
15239
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
488 | /* Tell everyone we ain't got one no more */ |
| 9310 | 489 | yahoo_send_picture_update(gc, 0); |
| 9306 | 490 | |
|
16538
c7e61e2917c9
Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@pidgin.im>
parents:
16534
diff
changeset
|
491 | } else { |
|
35834
5eb0ba6d126d
imgstore: unref yahoo
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35265
diff
changeset
|
492 | gconstpointer data = purple_image_get_data(img); |
|
5eb0ba6d126d
imgstore: unref yahoo
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35265
diff
changeset
|
493 | size_t len = purple_image_get_size(img); |
|
16538
c7e61e2917c9
Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@pidgin.im>
parents:
16534
diff
changeset
|
494 | GString *s = g_string_new_len(data, len); |
|
15239
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
495 | struct yahoo_buddy_icon_upload_data *d; |
| 15884 | 496 | int oldcksum = purple_account_get_int(account, YAHOO_PICCKSUM_SETTING, 0); |
| 497 | int expire = purple_account_get_int(account, YAHOO_PICEXPIRE_SETTING, 0); | |
| 498 | const char *oldurl = purple_account_get_string(account, YAHOO_PICURL_SETTING, NULL); | |
|
15239
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
499 | |
|
23170
456cbed76e54
applied changes from c7504bbbe35f5bef52032c0cdf6bc7182128a469
Daniel Atallah <datallah@pidgin.im>
parents:
23156
diff
changeset
|
500 | yd->picture_checksum = yahoo_buddy_icon_calculate_checksum(data, len); |
| 9306 | 501 | |
|
15239
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
502 | if ((yd->picture_checksum == oldcksum) && |
|
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
503 | (expire > (time(NULL) + 60*60*24)) && oldurl) |
|
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
504 | { |
| 15884 | 505 | purple_debug_misc("yahoo", "buddy icon is up to date. Not reuploading.\n"); |
|
15239
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
506 | g_string_free(s, TRUE); |
|
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
507 | g_free(yd->picture_url); |
|
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
508 | yd->picture_url = g_strdup(oldurl); |
|
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
509 | return; |
|
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
510 | } |
| 9306 | 511 | |
|
16757
aae5c0ced2da
Update the comments about yahoo buddy icons. Only send the filename and not the whole path.
Tim Ringenbach <marv@pidgin.im>
parents:
16606
diff
changeset
|
512 | /* We use this solely for sending a filename to the server */ |
|
15239
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
513 | d = g_new0(struct yahoo_buddy_icon_upload_data, 1); |
|
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
514 | d->gc = gc; |
|
34285
bae262cc5585
HTTP: removing extra yahoo HTTP implementations - buddy icon uploading
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34269
diff
changeset
|
515 | d->picture_data = s; |
|
35834
5eb0ba6d126d
imgstore: unref yahoo
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35265
diff
changeset
|
516 | d->filename = g_strdup(purple_image_get_friendly_filename(img)); |
| 9306 | 517 | |
|
15239
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
518 | if (!yd->logged_in) { |
|
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
519 | yd->picture_upload_todo = d; |
|
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
520 | return; |
|
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
521 | } |
| 9306 | 522 | |
|
15239
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
523 | yahoo_buddy_icon_upload(gc, d); |
|
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
524 | |
|
f31e2c11334e
[gaim-migrate @ 17964]
Mark Doliner <markdoliner@pidgin.im>
parents:
15042
diff
changeset
|
525 | } |
|
15245
3abed8bd82fb
[gaim-migrate @ 17972]
Mark Doliner <markdoliner@pidgin.im>
parents:
15239
diff
changeset
|
526 | } |