Ignore:
Timestamp:
2007-07-30T19:12:06Z (13 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
82135c7
Parents:
85023c6
Message:

Added jabber_error_parse() and using it for both stream- and stanza
(only presence so far) errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/presence.c

    r85023c6 r1baaef8  
    158158        else if( strcmp( type, "error" ) == 0 )
    159159        {
    160                 /* What to do with it? */
     160                struct jabber_error *err;
     161               
     162                if( ( c = xt_find_node( node->children, "error" ) ) )
     163                {
     164                        err = jabber_error_parse( c, XMLNS_STANZA_ERROR );
     165                        imcb_error( ic, "Stanza (%s) error: %s%s%s", node->name,
     166                                    err->code, err->text ? ": " : "",
     167                                    err->text ? err->text : "" );
     168                        jabber_error_free( err );
     169                }
     170                /* What else to do with it? */
    161171        }
    162172        else
Note: See TracChangeset for help on using the changeset viewer.