diff options
author | ulim <a.sporto+bee@gmail.com> | 2008-04-14 15:10:53 +0200 |
---|---|---|
committer | ulim <a.sporto+bee@gmail.com> | 2008-04-14 15:10:53 +0200 |
commit | b79308b943149d729b1daea8c56cff9fc02711a0 (patch) | |
tree | a5f80445ed63d864703941474dc6cf8998df3136 /account.c | |
parent | 6cac643f6933e431b90fcb937dec505f989e6a53 (diff) | |
parent | aa311173a85020bcbbbf61135a5451e171d422f5 (diff) |
merged in upstream r379 (somewhere after 1.2-3).
Just one trivial conflict in the jabber Makefile, went smoothly.
Diffstat (limited to 'account.c')
-rw-r--r-- | account.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -181,19 +181,17 @@ void account_del( irc_t *irc, account_t *acc ) { account_t *a, *l = NULL; + if( acc->ic ) + /* Caller should have checked, accounts still in use can't be deleted. */ + return; + for( a = irc->accounts; a; a = (l=a)->next ) if( a == acc ) { - if( a->ic ) return; /* Caller should have checked, accounts still in use can't be deleted. */ - if( l ) - { l->next = a->next; - } else - { irc->accounts = a->next; - } while( a->set ) set_del( &a->set, a->set->key ); @@ -202,7 +200,7 @@ void account_del( irc_t *irc, account_t *acc ) g_free( a->user ); g_free( a->pass ); - if( a->server ) g_free( a->server ); + g_free( a->server ); if( a->reconnect ) /* This prevents any reconnect still queued to happen */ cancel_auto_reconnect( a ); g_free( a ); |