9306
|
1 /*
|
|
2 * gaim
|
|
3 *
|
|
4 * Gaim is the legal property of its developers, whose names are too numerous
|
|
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
|
|
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
21 *
|
|
22 */
|
|
23
|
|
24 #include "internal.h"
|
|
25
|
|
26 #include "account.h"
|
|
27 #include "accountopt.h"
|
|
28 #include "blist.h"
|
|
29 #include "debug.h"
|
|
30 #include "prpl.h"
|
|
31 #include "proxy.h"
|
|
32 #include "util.h"
|
|
33
|
|
34 #include "yahoo.h"
|
|
35 #include "yahoo_friend.h"
|
|
36 #include "yahoo_picture.h"
|
|
37
|
|
38
|
|
39 struct yahoo_fetch_picture_data {
|
|
40 GaimConnection *gc;
|
|
41 char *who;
|
|
42 int checksum;
|
|
43 };
|
|
44
|
9310
|
45
|
|
46
|
9306
|
47 void yahoo_fetch_picture_cb(void *user_data, const char *pic_data, size_t len)
|
|
48 {
|
|
49 struct yahoo_fetch_picture_data *d = user_data;
|
|
50 GaimBuddy *b;
|
|
51
|
|
52 if (GAIM_CONNECTION_IS_VALID(d->gc) && len) {
|
|
53 gaim_buddy_icons_set_for_user(gaim_connection_get_account(d->gc), d->who, (void *)pic_data, len);
|
|
54 b = gaim_find_buddy(gaim_connection_get_account(d->gc), d->who);
|
|
55 if (b)
|
|
56 gaim_blist_node_set_int((GaimBlistNode*)b, YAHOO_ICON_CHECKSUM_KEY, d->checksum);
|
|
57 } else {
|
|
58 gaim_debug_error("yahoo", "Fetching buddy icon failed.\n");
|
|
59 }
|
|
60
|
|
61 g_free(d->who);
|
|
62 g_free(d);
|
|
63 }
|
|
64
|
|
65 void yahoo_process_picture(GaimConnection *gc, struct yahoo_packet *pkt)
|
|
66 {
|
|
67 GSList *l = pkt->hash;
|
|
68 char *who = NULL, *us = NULL;
|
|
69 gboolean got_icon_info = FALSE, send_icon_info = FALSE;
|
|
70 char *url = NULL;
|
|
71 int checksum = 0;
|
|
72
|
|
73 while (l) {
|
|
74 struct yahoo_pair *pair = l->data;
|
|
75
|
|
76 switch (pair->key) {
|
|
77 case 1:
|
|
78 case 4:
|
|
79 who = pair->value;
|
|
80 break;
|
|
81 case 5:
|
|
82 us = pair->value;
|
|
83 break;
|
|
84 case 13: {
|
|
85 int tmp;
|
|
86 tmp = strtol(pair->value, NULL, 10);
|
|
87 if (tmp == 1) {
|
|
88 send_icon_info = TRUE;
|
|
89 } else if (tmp == 2) {
|
|
90 got_icon_info = TRUE;
|
|
91 }
|
|
92 break;
|
|
93 }
|
|
94 case 20:
|
|
95 url = pair->value;
|
|
96 break;
|
|
97 case 192:
|
|
98 checksum = strtol(pair->value, NULL, 10);
|
|
99 break;
|
|
100 }
|
|
101
|
|
102 l = l->next;
|
|
103 }
|
|
104
|
|
105 if (who && got_icon_info && url) {
|
|
106 /* TODO: make this work p2p, try p2p before the url */
|
|
107 struct yahoo_fetch_picture_data *data;
|
|
108 GaimBuddy *b = gaim_find_buddy(gc->account, who);
|
|
109 if (b && (checksum == gaim_blist_node_get_int((GaimBlistNode*)b, YAHOO_ICON_CHECKSUM_KEY)))
|
|
110 return;
|
|
111
|
|
112 data = g_new0(struct yahoo_fetch_picture_data, 1);
|
|
113 data->gc = gc;
|
|
114 data->who = g_strdup(who);
|
|
115 data->checksum = checksum;
|
|
116 gaim_url_fetch(url, FALSE, "Mozilla/4.0 (compatible; MSIE 5.0)", FALSE,
|
|
117 yahoo_fetch_picture_cb, data);
|
|
118 } else if (who && send_icon_info) {
|
|
119 yahoo_send_picture_info(gc, who);
|
|
120 }
|
|
121
|
|
122 }
|
|
123
|
|
124 void yahoo_process_picture_update(GaimConnection *gc, struct yahoo_packet *pkt)
|
|
125 {
|
|
126 GSList *l = pkt->hash;
|
|
127 char *who = NULL;
|
|
128 int icon = 0;
|
|
129
|
|
130 while (l) {
|
|
131 struct yahoo_pair *pair = l->data;
|
|
132
|
|
133 switch (pair->key) {
|
|
134 case 4:
|
|
135 who = pair->value;
|
|
136 break;
|
|
137 case 5:
|
|
138 /* us */
|
|
139 break;
|
|
140 case 206:
|
|
141 icon = strtol(pair->value, NULL, 10);
|
|
142 break;
|
|
143 }
|
|
144 l = l->next;
|
|
145 }
|
|
146
|
|
147 if (who) {
|
|
148 if (icon == 2)
|
9310
|
149 yahoo_send_picture_request(gc, who);
|
9322
|
150 else if ((icon == 0) || (icon == 1)) {
|
9325
|
151 GaimBuddy *b = gaim_find_buddy(gc->account, who);
|
|
152 YahooFriend *f;
|
9306
|
153 gaim_buddy_icons_set_for_user(gc->account, who, NULL, 0);
|
9325
|
154 if (b)
|
|
155 gaim_blist_node_remove_setting((GaimBlistNode *)b, YAHOO_ICON_CHECKSUM_KEY);
|
|
156 if ((f = yahoo_friend_find(gc, who)))
|
|
157 yahoo_friend_set_buddy_icon_need_request(f, TRUE);
|
9322
|
158 gaim_debug_misc("yahoo", "Setting user %s's icon to NULL.\n", who);
|
|
159 }
|
9306
|
160 }
|
|
161 }
|
|
162
|
|
163 void yahoo_process_picture_checksum(GaimConnection *gc, struct yahoo_packet *pkt)
|
|
164 {
|
|
165 GSList *l = pkt->hash;
|
|
166 char *who = NULL;
|
|
167 int checksum = 0;
|
|
168
|
|
169 while (l) {
|
|
170 struct yahoo_pair *pair = l->data;
|
|
171
|
|
172 switch (pair->key) {
|
|
173 case 4:
|
|
174 who = pair->value;
|
|
175 break;
|
|
176 case 5:
|
|
177 /* us */
|
|
178 break;
|
|
179 case 192:
|
|
180 checksum = strtol(pair->value, NULL, 10);
|
|
181 break;
|
|
182 }
|
|
183 l = l->next;
|
|
184 }
|
|
185
|
|
186 if (who) {
|
|
187 GaimBuddy *b = gaim_find_buddy(gc->account, who);
|
|
188 if (b && (checksum != gaim_blist_node_get_int((GaimBlistNode*)b, YAHOO_ICON_CHECKSUM_KEY)))
|
9310
|
189 yahoo_send_picture_request(gc, who);
|
9306
|
190 }
|
|
191 }
|
|
192
|
|
193 void yahoo_process_picture_upload(GaimConnection *gc, struct yahoo_packet *pkt)
|
|
194 {
|
|
195 GaimAccount *account = gaim_connection_get_account(gc);
|
|
196 struct yahoo_data *yd = gc->proto_data;
|
|
197 GSList *l = pkt->hash;
|
|
198 char *url = NULL;
|
|
199
|
|
200 while (l) {
|
|
201 struct yahoo_pair *pair = l->data;
|
|
202
|
|
203 switch (pair->key) {
|
|
204 case 5:
|
|
205 /* us */
|
|
206 break;
|
|
207 case 27:
|
|
208 /* filename on our computer. */
|
|
209 break;
|
|
210 case 20: /* url at yahoo */
|
|
211 url = pair->value;
|
|
212 case 38: /* timestamp */
|
|
213 break;
|
|
214 }
|
|
215 l = l->next;
|
|
216 }
|
|
217
|
|
218 if (url) {
|
|
219 if (yd->picture_url)
|
|
220 g_free(yd->picture_url);
|
|
221 yd->picture_url = g_strdup(url);
|
|
222 gaim_account_set_string(account, YAHOO_PICURL_SETTING, url);
|
|
223 gaim_account_set_int(account, YAHOO_PICCKSUM_SETTING, yd->picture_checksum);
|
9310
|
224 yahoo_send_picture_update(gc, 2);
|
|
225 yahoo_send_picture_checksum(gc);
|
9306
|
226 }
|
|
227 }
|
|
228
|
9322
|
229 void yahoo_send_picture_info(GaimConnection *gc, const char *who)
|
|
230 {
|
|
231 struct yahoo_data *yd = gc->proto_data;
|
|
232 struct yahoo_packet *pkt;
|
|
233 char *buf;
|
|
234
|
9329
|
235 if (!yd->picture_url) {
|
|
236 gaim_debug_warning("yahoo", "Attempted to send picture info without a picture\n");
|
9322
|
237 return;
|
9329
|
238 }
|
9322
|
239
|
|
240 pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE, YAHOO_STATUS_AVAILABLE, 0);
|
|
241 yahoo_packet_hash(pkt, 1, gaim_connection_get_display_name(gc));
|
|
242 yahoo_packet_hash(pkt, 4, gaim_connection_get_display_name(gc));
|
|
243 yahoo_packet_hash(pkt, 5, who);
|
|
244 yahoo_packet_hash(pkt, 13, "2");
|
|
245 yahoo_packet_hash(pkt, 20, yd->picture_url);
|
|
246 buf = g_strdup_printf("%d", yd->picture_checksum);
|
|
247 yahoo_packet_hash(pkt, 192, buf);
|
|
248
|
|
249 yahoo_send_packet(yd, pkt);
|
|
250 yahoo_packet_free(pkt);
|
|
251 g_free(buf);
|
|
252 }
|
9306
|
253
|
9310
|
254 void yahoo_send_picture_request(GaimConnection *gc, const char *who)
|
9306
|
255 {
|
|
256 struct yahoo_data *yd = gc->proto_data;
|
|
257 struct yahoo_packet *pkt;
|
|
258
|
|
259 pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE, YAHOO_STATUS_AVAILABLE, 0);
|
|
260 yahoo_packet_hash(pkt, 4, gaim_connection_get_display_name(gc)); /* me */
|
|
261 yahoo_packet_hash(pkt, 5, who); /* the other guy */
|
|
262 yahoo_packet_hash(pkt, 13, "1"); /* 1 = request, 2 = reply */
|
|
263 yahoo_send_packet(yd, pkt);
|
|
264 yahoo_packet_free(pkt);
|
|
265 }
|
|
266
|
9310
|
267 void yahoo_send_picture_checksum(GaimConnection *gc)
|
|
268 {
|
|
269 struct yahoo_data *yd = gc->proto_data;
|
|
270 struct yahoo_packet *pkt;
|
|
271 char *cksum = g_strdup_printf("%d", yd->picture_checksum);
|
|
272
|
|
273 pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE_CHECKSUM, YAHOO_STATUS_AVAILABLE, 0);
|
|
274 yahoo_packet_hash(pkt, 1, gaim_connection_get_display_name(gc));
|
|
275 yahoo_packet_hash(pkt, 212, "1");
|
|
276 yahoo_packet_hash(pkt, 192, cksum);
|
|
277 yahoo_send_packet(yd, pkt);
|
|
278 yahoo_packet_free(pkt);
|
|
279 g_free(cksum);
|
|
280 }
|
|
281
|
|
282 void yahoo_send_picture_update_to_user(GaimConnection *gc, const char *who, int type)
|
|
283 {
|
|
284 struct yahoo_data *yd = gc->proto_data;
|
|
285 struct yahoo_packet *pkt;
|
|
286 char *typestr = g_strdup_printf("%d", type);
|
|
287
|
|
288 pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE_UPDATE, YAHOO_STATUS_AVAILABLE, 0);
|
|
289 yahoo_packet_hash(pkt, 1, gaim_connection_get_display_name(gc));
|
|
290 yahoo_packet_hash(pkt, 5, who);
|
|
291 yahoo_packet_hash(pkt, 206, typestr);
|
|
292 yahoo_send_packet(yd, pkt);
|
|
293 yahoo_packet_free(pkt);
|
|
294
|
|
295 g_free(typestr);
|
|
296 }
|
|
297
|
|
298 struct yspufe {
|
|
299 GaimConnection *gc;
|
|
300 int type;
|
|
301 };
|
|
302
|
|
303 static void yahoo_send_picture_update_foreach(gpointer key, gpointer value, gpointer data)
|
|
304 {
|
|
305 char *who = key;
|
|
306 YahooFriend *f = value;
|
|
307 struct yspufe *d = data;
|
|
308
|
|
309 if (f->status != YAHOO_STATUS_OFFLINE)
|
|
310 yahoo_send_picture_update_to_user(d->gc, who, d->type);
|
|
311 }
|
|
312
|
|
313 void yahoo_send_picture_update(GaimConnection *gc, int type)
|
|
314 {
|
|
315 struct yahoo_data *yd = gc->proto_data;
|
|
316 struct yspufe data;
|
|
317
|
|
318 data.gc = gc;
|
|
319 data.type = type;
|
|
320
|
|
321 g_hash_table_foreach(yd->friends, yahoo_send_picture_update_foreach, &data);
|
|
322 }
|
|
323
|
9306
|
324 void yahoo_buddy_icon_upload_data_free(struct yahoo_buddy_icon_upload_data *d)
|
|
325 {
|
|
326 gaim_debug_misc("yahoo", "In yahoo_buddy_icon_upload_data_free()\n");
|
|
327
|
|
328 if (d->str)
|
|
329 g_string_free(d->str, TRUE);
|
|
330 if (d->filename)
|
|
331 g_free(d->filename);
|
|
332 if (d->watcher)
|
|
333 gaim_input_remove(d->watcher);
|
|
334 if (d->fd != -1)
|
|
335 close(d->fd);
|
|
336 g_free(d);
|
|
337 }
|
|
338
|
|
339 /* we could care less about the server's responce, but yahoo gets grumpy if we close before it sends it */
|
|
340 static void yahoo_buddy_icon_upload_reading(gpointer data, gint source, GaimInputCondition condition)
|
|
341 {
|
|
342 struct yahoo_buddy_icon_upload_data *d = data;
|
|
343 GaimConnection *gc = d->gc;
|
|
344 char buf[1024];
|
|
345
|
|
346 if (!GAIM_CONNECTION_IS_VALID(gc)) {
|
|
347 yahoo_buddy_icon_upload_data_free(d);
|
|
348 return;
|
|
349 }
|
|
350
|
|
351 if (read(d->fd, buf, sizeof(buf)) <= 0)
|
|
352 yahoo_buddy_icon_upload_data_free(d);
|
|
353 }
|
|
354
|
|
355 static void yahoo_buddy_icon_upload_pending(gpointer data, gint source, GaimInputCondition condition)
|
|
356 {
|
|
357 struct yahoo_buddy_icon_upload_data *d = data;
|
|
358 GaimConnection *gc = d->gc;
|
|
359 ssize_t wrote;
|
|
360
|
|
361 if (!GAIM_CONNECTION_IS_VALID(gc)) {
|
|
362 yahoo_buddy_icon_upload_data_free(d);
|
|
363 return;
|
|
364 }
|
|
365
|
|
366 wrote = write(d->fd, d->str->str + d->pos, d->str->len - d->pos);
|
|
367 if (wrote <= 0) {
|
|
368 yahoo_buddy_icon_upload_data_free(d);
|
|
369 return;
|
|
370 }
|
|
371 d->pos += wrote;
|
|
372 if (d->pos >= d->str->len) {
|
|
373 gaim_debug_misc("yahoo", "Finished uploading buddy icon.\n");
|
|
374 gaim_input_remove(d->watcher);
|
|
375 d->watcher = gaim_input_add(d->fd, GAIM_INPUT_READ, yahoo_buddy_icon_upload_reading, d);
|
|
376 }
|
|
377 }
|
|
378
|
|
379 static void yahoo_buddy_icon_upload_connected(gpointer data, gint source, GaimInputCondition condition)
|
|
380 {
|
|
381 struct yahoo_buddy_icon_upload_data *d = data;
|
|
382 struct yahoo_packet *pkt;
|
|
383 gchar *size, *post, *buf;
|
|
384 int content_length;
|
|
385 GaimConnection *gc;
|
|
386 GaimAccount *account;
|
|
387 struct yahoo_data *yd;
|
|
388
|
|
389 if (!d)
|
|
390 return;
|
|
391
|
|
392
|
|
393 gc = d->gc;
|
|
394 account = gaim_connection_get_account(gc);
|
|
395 yd = gc->proto_data;
|
|
396
|
|
397
|
|
398 if (source < 0) {
|
|
399 gaim_debug_error("yahoo", "Buddy icon upload failed, no file desc.\n");
|
|
400 yahoo_buddy_icon_upload_data_free(d);
|
|
401 return;
|
|
402 }
|
|
403
|
|
404 d->fd = source;
|
|
405 d->watcher = gaim_input_add(d->fd, GAIM_INPUT_WRITE, yahoo_buddy_icon_upload_pending, d);
|
|
406
|
|
407 pkt = yahoo_packet_new(0xc2, YAHOO_STATUS_AVAILABLE, yd->session_id);
|
|
408
|
|
409 size = g_strdup_printf("%d", d->str->len);
|
|
410 /* 1 = me, 38 = expire time(?), 0 = me, 28 = size, 27 = filename, 14 = NULL, 29 = data */
|
|
411 yahoo_packet_hash(pkt, 1, gaim_connection_get_display_name(gc));
|
|
412 yahoo_packet_hash(pkt, 38, "604800"); /* time til expire */
|
|
413 gaim_account_set_int(account, YAHOO_PICEXPIRE_SETTING, time(NULL) + 604800);
|
|
414 yahoo_packet_hash(pkt, 0, gaim_connection_get_display_name(gc));
|
|
415 yahoo_packet_hash(pkt, 28, size);
|
|
416 yahoo_packet_hash(pkt, 27, d->filename);
|
|
417 yahoo_packet_hash(pkt, 14, "");
|
|
418
|
|
419 content_length = YAHOO_PACKET_HDRLEN + yahoo_packet_length(pkt);
|
|
420
|
|
421 buf = g_strdup_printf("Y=%s; T=%s", yd->cookie_y, yd->cookie_t);
|
|
422
|
|
423 post = g_strdup_printf("POST /notifyft HTTP/1.0\r\n"
|
|
424 "Content-length: %d\r\n"
|
|
425 "Host: %s:%d\r\n"
|
|
426 "Cookie: %s\r\n"
|
|
427 "\r\n",
|
|
428 content_length + 4 + d->str->len,
|
|
429 gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST),
|
|
430 gaim_account_get_int(account, "xfer_port", YAHOO_XFER_PORT),
|
|
431 buf);
|
|
432 write(d->fd, post, strlen(post));
|
|
433
|
|
434 yahoo_send_packet_special(d->fd, pkt, 8);
|
|
435 yahoo_packet_free(pkt);
|
|
436
|
|
437 write(d->fd, "29\xc0\x80", 4);
|
|
438
|
|
439 g_free(size);
|
|
440 g_free(post);
|
|
441 g_free(buf);
|
|
442 }
|
|
443
|
|
444 void yahoo_buddy_icon_upload(GaimConnection *gc, struct yahoo_buddy_icon_upload_data *d)
|
|
445 {
|
|
446 GaimAccount *account = gaim_connection_get_account(gc);
|
|
447 struct yahoo_data *yd = gc->proto_data;
|
|
448
|
|
449 if (yd->jp) {
|
|
450 if (gaim_proxy_connect(account, gaim_account_get_string(account, "xferjp_host", YAHOOJP_XFER_HOST),
|
|
451 gaim_account_get_int(account, "xfer_port", YAHOO_XFER_PORT),
|
|
452 yahoo_buddy_icon_upload_connected, d) == -1)
|
|
453 {
|
|
454 gaim_debug_error("yahoo", "Uploading our buddy icon failed to connect.\n");
|
|
455 yahoo_buddy_icon_upload_data_free(d);
|
|
456 }
|
|
457 } else {
|
|
458 if (gaim_proxy_connect(account, gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST),
|
|
459 gaim_account_get_int(account, "xfer_port", YAHOO_XFER_PORT),
|
|
460 yahoo_buddy_icon_upload_connected, d) == -1)
|
|
461 {
|
|
462 gaim_debug_error("yahoo", "Uploading our buddy icon failed to connect.\n");
|
|
463 yahoo_buddy_icon_upload_data_free(d);
|
|
464 }
|
|
465 }
|
|
466 }
|
|
467
|
|
468 void yahoo_set_buddy_icon(GaimConnection *gc, const char *iconfile)
|
|
469 {
|
|
470 struct yahoo_data *yd = gc->proto_data;
|
|
471 GaimAccount *account = gc->account;
|
|
472 FILE *file;
|
|
473 struct stat st;
|
|
474
|
|
475 if (iconfile == NULL) {
|
|
476 if (yd->picture_url)
|
|
477 g_free(yd->picture_url);
|
|
478 yd->picture_url = NULL;
|
|
479
|
|
480 gaim_account_set_string(account, YAHOO_PICURL_SETTING, NULL);
|
|
481 gaim_account_set_int(account, YAHOO_PICCKSUM_SETTING, 0);
|
|
482 gaim_account_set_int(account, YAHOO_PICEXPIRE_SETTING, 0);
|
9310
|
483 if (yd->logged_in)
|
|
484 yahoo_send_picture_update(gc, 0);
|
9306
|
485 /* TODO: check if we're connected and tell everyone we ain't not one no more */
|
|
486 } else if (!stat(iconfile, &st)) {
|
|
487 file = fopen(iconfile, "rb");
|
|
488 if (file) {
|
|
489 GString *s = g_string_sized_new(st.st_size);
|
|
490 size_t len;
|
|
491 struct yahoo_buddy_icon_upload_data *d;
|
|
492 int oldcksum = gaim_account_get_int(account, YAHOO_PICCKSUM_SETTING, 0);
|
|
493 int expire = gaim_account_get_int(account, YAHOO_PICEXPIRE_SETTING, 0);
|
|
494 const char *oldurl = gaim_account_get_string(account, YAHOO_PICURL_SETTING, NULL);
|
|
495
|
|
496 g_string_set_size(s, st.st_size);
|
|
497 len = fread(s->str, 1, st.st_size, file);
|
|
498 fclose(file);
|
|
499 g_string_set_size(s, len);
|
|
500 yd->picture_checksum = g_string_hash(s);
|
|
501
|
|
502 if ((yd->picture_checksum == oldcksum) && (expire > (time(NULL) + 60*60*24)) &&
|
|
503 oldcksum && expire && oldurl) {
|
|
504 gaim_debug_misc("yahoo", "buddy icon is up to date. Not reuploading.\n");
|
|
505 g_string_free(s, TRUE);
|
|
506 if (yd->picture_url)
|
|
507 g_free(yd->picture_url);
|
|
508 yd->picture_url = g_strdup(oldurl);
|
|
509 return;
|
|
510 }
|
|
511
|
|
512 d = g_new0(struct yahoo_buddy_icon_upload_data, 1);
|
|
513 d->gc = gc;
|
|
514 d->str = s;
|
|
515 d->fd = -1;
|
|
516 d->filename = g_strdup(iconfile);
|
|
517
|
|
518 if (!yd->logged_in) {
|
|
519 yd->picture_upload_todo = d;
|
|
520 return;
|
|
521 }
|
|
522
|
|
523 yahoo_buddy_icon_upload(gc, d);
|
|
524 } else
|
|
525 gaim_debug_error("yahoo",
|
|
526 "Can't open buddy icon file!\n");
|
|
527 } else
|
|
528 gaim_debug_error("yahooo",
|
|
529 "Can't stat buddy icon file!\n");
|
|
530 }
|