Changeset eabc9d2 for protocols


Ignore:
Timestamp:
2010-04-11T22:49:32Z (11 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
6c56f42
Parents:
d986463
Message:

Fixed cleanup issues when turning off an account. Also fixed syntax of
*_user_free().

Location:
protocols
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • protocols/bee.h

    rd986463 reabc9d2  
    8585/* bee_user.c */
    8686bee_user_t *bee_user_new( bee_t *bee, struct im_connection *ic, const char *handle );
    87 int bee_user_free( bee_t *bee, struct im_connection *ic, const char *handle );
     87int bee_user_free( bee_t *bee, bee_user_t *bu );
    8888bee_user_t *bee_user_by_handle( bee_t *bee, struct im_connection *ic, const char *handle );
    8989int bee_user_msg( bee_t *bee, bee_user_t *bu, const char *msg, int flags );
  • protocols/bee_user.c

    rd986463 reabc9d2  
    4646}
    4747
    48 int bee_user_free( bee_t *bee, struct im_connection *ic, const char *handle )
     48int bee_user_free( bee_t *bee, bee_user_t *bu )
    4949{
    50         bee_user_t *bu;
    51        
    52         if( ( bu = bee_user_by_handle( bee, ic, handle ) ) == NULL )
     50        if( !bu )
    5351                return 0;
    5452       
  • protocols/nogaim.c

    rd986463 reabc9d2  
    327327        ic->away = NULL;
    328328       
    329         for( l = bee->users; l; l = l->next )
     329        for( l = bee->users; l; )
    330330        {
    331331                bee_user_t *bu = l->data;
     332                GSList *next = l->next;
    332333               
    333334                if( bu->ic == ic )
    334                         bee_user_free( bee, ic, bu->handle );
     335                        bee_user_free( bee, bu );
     336               
     337                l = next;
    335338        }
    336339       
     
    403406void imcb_remove_buddy( struct im_connection *ic, const char *handle, char *group )
    404407{
    405         bee_user_free( ic->bee, ic, handle );
     408        bee_user_free( ic->bee, bee_user_by_handle( ic->bee, ic, handle ) );
    406409}
    407410
Note: See TracChangeset for help on using the changeset viewer.