Changeset 4346c3f4 for storage_xml.c


Ignore:
Timestamp:
2010-07-16T23:31:55Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
e437366
Parents:
3709301 (diff), ef14a83 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging mainline.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • storage_xml.c

    r3709301 r4346c3f4  
    5959        char *given_pass;
    6060        xml_pass_st pass_st;
     61        int unknown_tag;
    6162};
    6263
     
    8687        irc_t *irc = xd->irc;
    8788       
    88         if( g_strcasecmp( element_name, "user" ) == 0 )
     89        if( xd->unknown_tag > 0 )
     90        {
     91                xd->unknown_tag ++;
     92        }
     93        else if( g_strcasecmp( element_name, "user" ) == 0 )
    8994        {
    9095                char *nick = xml_attr( attr_names, attr_values, "nick" );
     
    267272        else
    268273        {
     274                xd->unknown_tag ++;
     275                irc_usermsg( irc, "Warning: Unknown XML tag found in configuration file (%s). "
     276                                  "This may happen when downgrading BitlBee versions. "
     277                                  "This tag will be skipped and the information will be lost "
     278                                  "once you save your settings.", element_name );
     279                /*
    269280                g_set_error( error, G_MARKUP_ERROR, G_MARKUP_ERROR_UNKNOWN_ELEMENT,
    270281                             "Unkown element: %s", element_name );
     282                */
    271283        }
    272284}
     
    276288        struct xml_parsedata *xd = data;
    277289       
    278         if( g_strcasecmp( element_name, "setting" ) == 0 && xd->current_setting )
     290        if( xd->unknown_tag > 0 )
     291        {
     292                xd->unknown_tag --;
     293        }
     294        else if( g_strcasecmp( element_name, "setting" ) == 0 && xd->current_setting )
    279295        {
    280296                g_free( xd->current_setting );
Note: See TracChangeset for help on using the changeset viewer.