Changeset 11e7828 for protocols


Ignore:
Timestamp:
2015-01-26T02:43:35Z (5 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
5eab298f
Parents:
fcb2c2e
git-author:
dequis <dx@…> (23-01-15 06:29:00)
git-committer:
dequis <dx@…> (26-01-15 02:43:35)
Message:

Fix whatsapp local contact lists

Had to move the code that adds contacts to imcb_connected to avoid
dereferencing a null im_connection.

Turns out this kind of local contact lists only applies to renamed
contacts, though. It doesn't deal with libpurple's blist.xml at all
(it could, there are APIs for it since 2.6.0)

Location:
protocols
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • protocols/account.c

    rfcb2c2e r11e7828  
    2929
    3030static const char* account_protocols_local[] = {
    31         "gg", NULL
     31        "gg", "whatsapp", NULL
    3232};
    3333
     
    351351void account_on( bee_t *bee, account_t *a )
    352352{
    353         GHashTableIter nicks;
    354         gpointer k, v;
    355 
    356353        if( a->ic )
    357354        {
     
    367364        if( a->ic && !( a->ic->flags & ( OPT_SLOW_LOGIN | OPT_LOGGED_IN ) ) )
    368365                a->ic->keepalive = b_timeout_add( 120000, account_on_timeout, a->ic );
    369 
    370         if( a->flags & ACC_FLAG_LOCAL )
    371         {
    372                 g_hash_table_iter_init(&nicks, a->nicks);
    373                 while( g_hash_table_iter_next( &nicks, &k, &v ) )
    374                 {
    375                         a->prpl->add_buddy( a->ic, (char*) k, NULL );
    376                 }
    377         }
    378366}
    379367
  • protocols/nogaim.c

    rfcb2c2e r11e7828  
    294294        if( ic->flags & OPT_LOGGED_IN )
    295295                return;
     296
     297        if( ic->acc->flags & ACC_FLAG_LOCAL )
     298        {
     299                GHashTableIter nicks;
     300                gpointer k, v;
     301                g_hash_table_iter_init( &nicks, ic->acc->nicks );
     302                while( g_hash_table_iter_next( &nicks, &k, &v ) )
     303                {
     304                        ic->acc->prpl->add_buddy( ic, (char*) k, NULL );
     305                }
     306        }
    296307       
    297308        imcb_log( ic, "Logged in" );
Note: See TracChangeset for help on using the changeset viewer.