Mercurial > pidgin
changeset 7054:7c04a0775918
[gaim-migrate @ 7617]
WinGaim 0.69 moved the gaim settings directory exposing an oscar bug..
What to do if a buddy icon cache copy does not exist but a check sum does.
Also moved win32 code to initialize gaim settings dir before core initializations.
committer: Tailor Script <tailor@pidgin.im>
author | Herman Bloggs <hermanator12002@yahoo.com> |
---|---|
date | Tue, 30 Sep 2003 05:36:28 +0000 |
parents | 9d8e56c66854 |
children | 2234420abada |
files | src/main.c src/protocols/oscar/oscar.c |
diffstat | 2 files changed, 15 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main.c Tue Sep 30 03:06:50 2003 +0000 +++ b/src/main.c Tue Sep 30 05:36:28 2003 +0000 @@ -799,6 +799,11 @@ gaim_core_set_ui_ops(gaim_gtk_core_get_ui_ops()); +#ifdef _WIN32 + wgaim_set_hinstance(hint); + wgaim_pre_plugin_init(); +#endif + if (!gaim_core_init(GAIM_GTK_UI)) { fprintf(stderr, "Initialization of the Gaim core failed. Dumping core.\n" @@ -806,11 +811,6 @@ abort(); } -#ifdef _WIN32 - wgaim_set_hinstance(hint); - wgaim_pre_plugin_init(); -#endif - plugin_search_paths[0] = LIBDIR; plugin_search_paths[1] = gaim_user_dir(); plugin_search_paths[2] = g_strdup_printf("%s/plugins", gaim_user_dir());
--- a/src/protocols/oscar/oscar.c Tue Sep 30 03:06:50 2003 +0000 +++ b/src/protocols/oscar/oscar.c Tue Sep 30 05:36:28 2003 +0000 @@ -1824,10 +1824,19 @@ if (info->iconcsumlen) { char *b16, *saved_b16; GaimBuddy *b; + FILE *file; b16 = tobase16(info->iconcsum, info->iconcsumlen); b = gaim_find_buddy(gc->account, info->sn); - saved_b16 = gaim_buddy_get_setting(b, "icon_checksum"); + /* If for some reason the checksum is valid, but cached file is not.. + we want to know. */ + if((file = fopen(gaim_buddy_get_setting(b, "buddy_icon"), "rb"))) { + fclose(file); + saved_b16 = gaim_buddy_get_setting(b, "icon_checksum"); + } + else + saved_b16 = NULL; + if (!b16 || !saved_b16 || strcmp(b16, saved_b16)) { GSList *cur = od->requesticon; while (cur && aim_sncmp((char *)cur->data, info->sn))