# HG changeset patch # User Nathan Walp # Date 1044050218 0 # Node ID 5968bcd8ddb65a996e7e4ba683c290059024292d # Parent 71e8b8e62a54795c62eca9e5969dea7a468d0650 [gaim-migrate @ 4772] OK, I think the reason we've been losing buddy lists (which with SSI makes it look like buddies are getting randomly moved) is that something is trying to write the blist.xml file before it is read. So we now check to make sure we've read the file before we allow any writes to happen. If anyone has any "randomly moving" buddies after this, please let me know. committer: Tailor Script diff -r 71e8b8e62a54 -r 5968bcd8ddb6 src/list.c --- a/src/list.c Fri Jan 31 21:33:04 2003 +0000 +++ b/src/list.c Fri Jan 31 21:56:58 2003 +0000 @@ -720,6 +720,7 @@ return FALSE; } +static gboolean blist_safe_to_write = FALSE; static char *blist_parser_group_name = NULL; static char *blist_parser_person_name = NULL; @@ -986,10 +987,10 @@ char *filename; char *msg; - if(!user_dir) { - debug_printf("unable to get user dir! buddy list load aborted!\n"); + blist_safe_to_write = TRUE; + + if(!user_dir) return; - } filename = g_build_filename(user_dir, "blist.xml", NULL); @@ -1113,6 +1114,11 @@ if(!user_dir) return; + if(!blist_safe_to_write) { + debug_printf("AHH!! tried to write the blist before we read it!\n"); + return; + } + file = fopen(user_dir, "r"); if(!file) mkdir(user_dir, S_IRUSR | S_IWUSR | S_IXUSR);