Changeset eb6df6a for protocols/jabber


Ignore:
Timestamp:
2010-07-11T17:21:21Z (14 years ago)
Author:
Sven Moritz Hallberg <pesco@…>
Branches:
master
Children:
be999a5
Parents:
3759849 (diff), 00540d4 (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:

merge with upstraem bitlbee 1.2.8

Location:
protocols/jabber
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/iq.c

    r3759849 reb6df6a  
    6565                if( strcmp( s, XMLNS_VERSION ) == 0 )
    6666                {
    67                         xt_add_child( reply, xt_new_node( "name", "BitlBee", NULL ) );
     67                        xt_add_child( reply, xt_new_node( "name", set_getstr( &ic->acc->set, "user_agent" ), NULL ) );
    6868                        xt_add_child( reply, xt_new_node( "version", BITLBEE_VERSION, NULL ) );
    6969                        xt_add_child( reply, xt_new_node( "os", ARCH, NULL ) );
     
    105105                        xt_add_attr( c, "category", "client" );
    106106                        xt_add_attr( c, "type", "pc" );
    107                         xt_add_attr( c, "name", "BitlBee" );
     107                        xt_add_attr( c, "name", set_getstr( &ic->acc->set, "user_agent" ) );
    108108                        xt_add_child( reply, c );
    109109                       
  • protocols/jabber/jabber.c

    r3759849 reb6df6a  
    7979        s = set_add( &acc->set, "tls", "try", set_eval_tls, acc );
    8080        s->flags |= ACC_SET_OFFLINE_ONLY;
     81       
     82        s = set_add( &acc->set, "user_agent", "BitlBee", NULL, acc );
    8183       
    8284        s = set_add( &acc->set, "xmlconsole", "false", set_eval_bool, acc );
     
    286288                g_hash_table_destroy( jd->node_cache );
    287289       
     290        jabber_buddy_remove_all( ic );
     291       
    288292        xt_free( jd->xt );
    289293       
     
    470474{
    471475        /* Just any whitespace character is enough as a keepalive for XMPP sessions. */
    472         jabber_write( ic, "\n", 1 );
     476        if( !jabber_write( ic, "\n", 1 ) )
     477                return;
    473478       
    474479        /* This runs the garbage collection every minute, which means every packet
  • protocols/jabber/jabber.h

    r3759849 reb6df6a  
    230230int jabber_buddy_remove( struct im_connection *ic, char *full_jid );
    231231int jabber_buddy_remove_bare( struct im_connection *ic, char *bare_jid );
     232void jabber_buddy_remove_all( struct im_connection *ic );
    232233time_t jabber_get_timestamp( struct xt_node *xt );
    233234struct jabber_error *jabber_error_parse( struct xt_node *node, char *xmlns );
  • protocols/jabber/jabber_util.c

    r3759849 reb6df6a  
    665665}
    666666
     667static gboolean jabber_buddy_remove_all_cb( gpointer key, gpointer value, gpointer data )
     668{
     669        struct jabber_buddy *bud, *next;
     670       
     671        bud = value;
     672        while( bud )
     673        {
     674                next = bud->next;
     675                g_free( bud->ext_jid );
     676                g_free( bud->full_jid );
     677                g_free( bud->away_message );
     678                g_free( bud );
     679                bud = next;
     680        }
     681       
     682        return TRUE;
     683}
     684
     685void jabber_buddy_remove_all( struct im_connection *ic )
     686{
     687        struct jabber_data *jd = ic->proto_data;
     688       
     689        g_hash_table_foreach_remove( jd->buddies, jabber_buddy_remove_all_cb, NULL );
     690        g_hash_table_destroy( jd->buddies );
     691}
     692
    667693time_t jabber_get_timestamp( struct xt_node *xt )
    668694{
  • protocols/jabber/message.c

    r3759849 reb6df6a  
    5555                        struct xt_node *inv, *reason;
    5656                       
    57                         if( strcmp( ns, XMLNS_MUC_USER ) == 0 &&
     57                        if( ns && strcmp( ns, XMLNS_MUC_USER ) == 0 &&
    5858                            ( inv = xt_find_node( c->children, "invite" ) ) )
    5959                        {
Note: See TracChangeset for help on using the changeset viewer.