# HG changeset patch # User Nathan Walp # Date 1043725642 0 # Node ID 7693d84255e767f42ddb918121609e454eabff9b # Parent 2054d842992523f96b82b7ef5a9c656b089ae38e [gaim-migrate @ 4714] die correctly (i.e. not silently) on invalid XML in the buddy list. hopefully this will let us figure out the problems people are having committer: Tailor Script diff -r 2054d8429925 -r 7693d84255e7 src/list.c --- a/src/list.c Tue Jan 28 02:45:34 2003 +0000 +++ b/src/list.c Tue Jan 28 03:47:22 2003 +0000 @@ -751,6 +751,7 @@ BLIST_TAG_BLOCK, BLIST_TAG_IGNORE } blist_parser_current_tag; +static gboolean blist_parser_error_occurred = FALSE; static void blist_start_element_handler (GMarkupParseContext *context, const gchar *element_name, @@ -917,12 +918,18 @@ } } +static void blist_error_handler(GMarkupParseContext *context, GError *error, + gpointer user_data) { + blist_parser_error_occurred = TRUE; + debug_printf("error parsing blist.xml: %s\n", error->message); +} + static GMarkupParser blist_parser = { blist_start_element_handler, blist_end_element_handler, blist_text_handler, NULL, - NULL + blist_error_handler }; static gboolean gaim_blist_read(const char *filename) { @@ -950,6 +957,9 @@ } g_markup_parse_context_free(context); + if(blist_parser_error_occurred) + return FALSE; + return TRUE; }