Ignore:
Timestamp:
2008-04-14T13:10:53Z (16 years ago)
Author:
ulim <a.sporto+bee@…>
Branches:
master
Children:
0cab388
Parents:
6cac643 (diff), aa31117 (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:

merged in upstream r379 (somewhere after 1.2-3).
Just one trivial conflict in the jabber Makefile, went smoothly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/iq.c

    r6cac643 rb79308b  
    534534}
    535535
     536static xt_status jabber_add_to_roster_callback( struct im_connection *ic, struct xt_node *node, struct xt_node *orig );
     537
    536538int jabber_add_to_roster( struct im_connection *ic, char *handle, char *name )
    537539{
     
    549551        xt_add_attr( node, "xmlns", XMLNS_ROSTER );
    550552        node = jabber_make_packet( "iq", "set", NULL, node );
     553        jabber_cache_add( ic, node, jabber_add_to_roster_callback );
    551554       
    552555        st = jabber_write_packet( ic, node );
    553556       
    554         xt_free_node( node );
    555557        return st;
     558}
     559
     560static xt_status jabber_add_to_roster_callback( struct im_connection *ic, struct xt_node *node, struct xt_node *orig )
     561{
     562        char *s, *jid = NULL;
     563        struct xt_node *c;
     564       
     565        if( ( c = xt_find_node( orig->children, "query" ) ) &&
     566            ( c = xt_find_node( c->children, "item" ) ) &&
     567            ( jid = xt_find_attr( c, "jid" ) ) &&
     568            ( s = xt_find_attr( node, "type" ) ) &&
     569            strcmp( s, "result" ) == 0 )
     570        {
     571                if( imcb_find_buddy( ic, jid ) == NULL )
     572                        imcb_add_buddy( ic, jid, NULL );
     573        }
     574        else
     575        {
     576                imcb_log( ic, "Error while adding `%s' to your contact list.",
     577                          jid ? jid : "(unknown handle)" );
     578        }
     579       
     580        return XT_HANDLED;
    556581}
    557582
Note: See TracChangeset for help on using the changeset viewer.