[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: branches/KDE/3.5/kdenetwork/kopete/libkopete
From:       Olivier Goffart <ogoffart () tiscalinet ! be>
Date:       2005-08-25 17:54:52
Message-ID: 200508251954.53204.ogoffart () tiscalinet ! be
[Download RAW message or body]

Le Jeudi 25 Août 2005 19:42, Olivier Goffart a écrit :
> SVN commit 453262 by ogoffart:
>
> Only try to connect 3 times

I forgot to mention this is a fix for
Bug 87641: Kopete won't stop trying to connect

and to CC matt


>  M  +9 -1      kopeteaccount.cpp
>
>
> --- branches/KDE/3.5/kdenetwork/kopete/libkopete/kopeteaccount.cpp
> #453261:453262 @@ -59,6 +59,7 @@
>  	 , excludeconnect( true ), priority( 0 ), myself( 0 )
>  	 , suppressStatusTimer( 0 ), suppressStatusNotification( false )
>  	 , blackList( new Kopete::BlackLister( protocol->pluginId(), accountId )
> ) +	 , connectionTry(0)
>  	{ }
>
>
> @@ -76,6 +77,7 @@
>  	bool suppressStatusNotification;
>  	Kopete::BlackLister *blackList;
>  	KConfigGroup *configGroup;
> +	uint connectionTry;
>  };
>
>  Account::Account( Protocol *parent, const QString &accountId, const char
> *name ) @@ -113,8 +115,11 @@
>  	if ( ( KopetePrefs::prefs()->reconnectOnDisconnect() == true && reason >
> Manual ) || reason == BadPassword )
>  	{
> +		if(reason != BadPassword)
> +			d->connectionTry++;
>  		//use a timer to allow the plugins to clean up after return
> -		QTimer::singleShot(0, this, SLOT(connect()));
> +		if(d->connectionTry < 3)
> +			QTimer::singleShot( 0, this, SLOT(connect()));
>  	}
>  	if(reason== OtherClient)
>  	{
> @@ -405,6 +410,7 @@
>  		// connection's speed and your computer's speed you *will* need it.
>  		d->suppressStatusNotification = true;
>  		d->suppressStatusTimer.start( 5000, true );
> +		//the timer is also used to reset the d->connectionTry
>  	}
>
>  /*	kdDebug(14010) << k_funcinfo << "account " << d->id << " changed
> status. was " @@ -427,6 +433,8 @@
>  void Account::slotStopSuppression()
>  {
>  	d->suppressStatusNotification = false;
> +	if(isConnected())
> +		d->connectionTry=0;
>  }
>
>  bool Account::suppressStatusNotification() const

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic