diff options
author | dequis <dx@dxzone.com.ar> | 2015-01-23 03:29:00 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-01-25 23:43:35 -0300 |
commit | 11e782892c33d6ecae949bc610c075107c0cda89 (patch) | |
tree | 1e2a2caf0f1fc60d409c742151ce5caa57f6d3bd /protocols/nogaim.c | |
parent | fcb2c2eee4526bb58dccf17f8702d670dda62644 (diff) |
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)
Diffstat (limited to 'protocols/nogaim.c')
-rw-r--r-- | protocols/nogaim.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/protocols/nogaim.c b/protocols/nogaim.c index ff1c9a85..0a674b40 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -293,6 +293,17 @@ void imcb_connected( struct im_connection *ic ) function should be handled correctly. (IOW, ignored) */ if( ic->flags & OPT_LOGGED_IN ) return; + + if( ic->acc->flags & ACC_FLAG_LOCAL ) + { + GHashTableIter nicks; + gpointer k, v; + g_hash_table_iter_init( &nicks, ic->acc->nicks ); + while( g_hash_table_iter_next( &nicks, &k, &v ) ) + { + ic->acc->prpl->add_buddy( ic, (char*) k, NULL ); + } + } imcb_log( ic, "Logged in" ); |