Summary: | OSCAR plugin tells you password is wrong, but does not prompt for re-entry | ||
---|---|---|---|
Product: | [Applications] kopete | Reporter: | Casey Allen Shobe <cshobe> |
Component: | ICQ and AIM Plugins | Assignee: | Kopete Developers <kopete-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | LO | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Casey Allen Shobe
2003-09-20 08:33:05 UTC
s/AIM/Oscar/ This applies to ICQ as well. Yes that's true, in that case you should call KopeteAccount::password(true) and try to reconnect. However, since there is a bug than sometimes my password is refused even if it's correct, and i just need to retry and that's work, it may be annoying. so it would be nice if you could fix this bug before Fix it yourself, it works here In current CVS, this still exists. To reproduce: 1. Set an AIM or ICQ account offline. 2. Go into the config and change the password to something random. 3. Save and try reconnecting. You'll get a popup which says "Sign on failed because the password supplied for this screen name is invalid. Please check your password and try again." This can be found in protocols/oscar/oscarsocket/oscarsocket.cpp on line 867. When case 5 occurs, the user should be prompted for his correct password to be consistant with the behavior of the other protocols. > However, since there is a bug than sometimes my password is refused even if
> it's correct, and i just need to retry and that's work, it may be annoying.
> so it would be nice if you could fix this bug before
That was the actual part that has to be fixed by Olivier.
I'll hopefully unify handling for the packet telling us about wrong passwords
(currently this is done in two functions, one for AIM and one for ICQ although
there's no need for that duplication). After that I can change the error and add
something to retry login.
it's a bug, but not something i can get to before KDE 3.2 setting back to normal. i keep missing it. ;( CVS commit by lilachaze: Detect when the password is wrong, and try to reconnect. CCMAIL: 64584-done@bugs.kde.org M +19 -2 oscaraccount.cpp 1.105 M +5 -0 oscaraccount.h 1.50 M +1 -1 aim/aimaccount.cpp 1.30 M +1 -1 icq/icqaccount.cpp 1.39 --- kdenetwork/kopete/protocols/oscar/oscaraccount.cpp #1.104:1.105 @@ -92,4 +92,6 @@ public: QMap<QString, AIMGroup *> groupNameMap; // -- END MERGED DATA FROM AIMBUDDYLIST ------------------------------ + + bool passwordWrong; }; @@ -110,4 +112,5 @@ OscarAccount::OscarAccount(KopeteProtoco d->lastIdleValue = 0; d->awayMessage = ""; + d->passwordWrong = false; initEngine(isICQ); // Initialize the backend @@ -191,4 +194,9 @@ void OscarAccount::disconnect() } +bool OscarAccount::passwordWasWrong() +{ + return d->passwordWrong; +} + void OscarAccount::initEngine(bool icq) { @@ -213,10 +221,17 @@ void OscarAccount::slotError(QString err // 1 = username unknown to server - // 5 = wrong password - if (errorCode == 1 || errorCode == 5 || errorCode == 24) + // 5 = wrong password for AIM + // 0 = wrong password for ICQ + if (errorCode == 1 || errorCode == 0 || errorCode == 5 || errorCode == 24) OscarAccount::disconnect(); KMessageBox::queuedMessageBox(Kopete::UI::Global::mainWidget(), KMessageBox::Error, errmsg, i18n("Connection Lost - ICQ Plugin"), KMessageBox::Notify); + + if (errorCode == 0 || errorCode == 5) + { + d->passwordWrong = true; + connect(); + } } @@ -394,4 +409,6 @@ void OscarAccount::slotLoggedIn() kdDebug(14150) << k_funcinfo << "Called" << endl; + d->passwordWrong = false; + // Only call sync if we received a list on connect, does not happen on @mac AIM-accounts bool haveServerSideContacts = false; --- kdenetwork/kopete/protocols/oscar/oscaraccount.h #1.49:1.50 @@ -57,4 +57,9 @@ public: /* + * Was the password wrong last time we tried to connect? + */ + bool passwordWasWrong(); + + /* * Sets the account away */ --- kdenetwork/kopete/protocols/oscar/aim/aimaccount.cpp #1.29:1.30 @@ -251,5 +251,5 @@ void AIMAccount::connect(const unsigned else if (screenName != i18n("(No Screen Name Set)") ) // FIXME: Is this needed at all? { - QString _password = password(false, 0L, 16); + QString _password = password(passwordWasWrong(), 0L, 16); if (_password.isEmpty()) { --- kdenetwork/kopete/protocols/oscar/icq/icqaccount.cpp #1.38:1.39 @@ -151,5 +151,5 @@ void ICQAccount::connect(const unsigned else if (screenName != i18n("(No Screen Name Set)") ) // FIXME: Is this needed at all? { - QString _password = password(false, 0L, 16); + QString _password = password(passwordWasWrong(), 0L, 8); if (_password.isEmpty()) { |