diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2013-01-13 11:11:26 +0000 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2013-01-13 11:11:26 +0000 | 
| commit | 4cb21b79b3ade188b628dfc877cfa5fd6f8d5d03 (patch) | |
| tree | 4cb575391eb63b00065786e065b7031ef8cdf12b /protocols/account.c | |
| parent | 106f19c8e09cda4a0cc419d3d8fa05839e66e268 (diff) | |
Don't set up the account_on_timeout() timer if *_login() called
imcb_connected() immediately. It's an unusual thing to do since normally
there's a bunch of I/O that needs to happen first, but some plugins would
like to do this.
Diffstat (limited to 'protocols/account.c')
| -rw-r--r-- | protocols/account.c | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/protocols/account.c b/protocols/account.c index 0eb16b59..1a80df25 100644 --- a/protocols/account.c +++ b/protocols/account.c @@ -349,7 +349,7 @@ void account_on( bee_t *bee, account_t *a )  	a->reconnect = 0;  	a->prpl->login( a ); -	if( a->ic && !( a->ic->flags & OPT_SLOW_LOGIN ) ) +	if( a->ic && !( a->ic->flags & ( OPT_SLOW_LOGIN | OPT_LOGGED_IN ) ) )  		a->ic->keepalive = b_timeout_add( 120000, account_on_timeout, a->ic );  } @@ -368,8 +368,11 @@ static gboolean account_on_timeout( gpointer d, gint fd, b_input_condition cond  {  	struct im_connection *ic = d; -	imcb_error( ic, "Connection timeout" ); -	imc_logout( ic, TRUE ); +	if( !( ic->flags & ( OPT_SLOW_LOGIN | OPT_LOGGED_IN ) ) ) +	{ +		imcb_error( ic, "Connection timeout" ); +		imc_logout( ic, TRUE ); +	}  	return FALSE;  } | 
