comparison libpurple/protocols/yahoo/yahoo_picture.c @ 16685:34618fedf5b9

Update the comments about yahoo buddy icons. Only send the filename and not the whole path.
author Tim Ringenbach <marv@pidgin.im>
date Wed, 25 Apr 2007 02:25:53 +0000
parents 0b49b01e9482
children 6ec8bae7d98a
comparison
equal deleted inserted replaced
16684:a0cae757170f 16685:34618fedf5b9
544 const char *oldurl = purple_account_get_string(account, YAHOO_PICURL_SETTING, NULL); 544 const char *oldurl = purple_account_get_string(account, YAHOO_PICURL_SETTING, NULL);
545 char *iconfile; 545 char *iconfile;
546 546
547 /* TODO: At some point, it'd be nice to fix this for real, or 547 /* TODO: At some point, it'd be nice to fix this for real, or
548 * TODO: at least change it to be something like: 548 * TODO: at least change it to be something like:
549 * TODO: purple_imgstore_get_filename(img); */ 549 * TODO: purple_imgstore_get_filename(img);
550 * TODO: But it would be great if we knew how to calculate the
551 * TODO: Checksum correctly. */
550 yd->picture_checksum = g_string_hash(s); 552 yd->picture_checksum = g_string_hash(s);
551 553
552 if ((yd->picture_checksum == oldcksum) && 554 if ((yd->picture_checksum == oldcksum) &&
553 (expire > (time(NULL) + 60*60*24)) && oldurl) 555 (expire > (time(NULL) + 60*60*24)) && oldurl)
554 { 556 {
557 g_free(yd->picture_url); 559 g_free(yd->picture_url);
558 yd->picture_url = g_strdup(oldurl); 560 yd->picture_url = g_strdup(oldurl);
559 return; 561 return;
560 } 562 }
561 563
562 /* TODO: FIXME: This is completely wrong. The upload code needs to 564 /* We use this solely for sending a filename to the server */
563 * TODO: be modified to work with a PurpleStoredImage. */ 565 iconfile = g_strdup(purple_imgstore_get_filename(img));
564 iconfile = g_build_filename(purple_buddy_icons_get_cache_dir(),
565 purple_imgstore_get_filename(img), NULL);
566 d = g_new0(struct yahoo_buddy_icon_upload_data, 1); 566 d = g_new0(struct yahoo_buddy_icon_upload_data, 1);
567 d->gc = gc; 567 d->gc = gc;
568 d->str = s; 568 d->str = s;
569 d->fd = -1; 569 d->fd = -1;
570 d->filename = iconfile; 570 d->filename = iconfile;