maemo.org Bugzilla – Bug 12339
Miniature logs to FICS already in MainPage
Last modified: 2011-09-18 07:53:08 UTC
You need to log in before you can comment on or make changes to this bug.
SOFTWARE VERSION: 0.3 in N9 EXACT STEPS LEADING TO PROBLEM: 1. Boot Miniature EXPECTED OUTCOME: Just boots up, nothing else. ACTUAL OUTCOME: The logs show that already in MainPage there is a FICS conenction and activity going on. Before logging in as guest or registered user. REPRODUCIBILITY: always
Would consider this an easyfix, still. One can quickly debug where the connection to FICS gets activated, in https://gitorious.org/miniature/miniature/blobs/master/game/fics/backend.cc
(In reply to comment #1) > https://gitorious.org/miniature/miniature/blobs/master/game/fics/backend.cc "Sorry, page not found", and I couldn't find backend.cc.
I had chosen to rename it: https://gitorious.org/miniature/miniature/blobs/master/game/fics/engine.cc
fwiw this is my attempt of finding a solution. Seems to work now, I have tested both just waiting without logging in and introducing a wrong userid: diff --git a/game/fics/engine.cc b/game/fics/engine.cc index 2a58bd7..2cf6f94 100644 --- a/game/fics/engine.cc +++ b/game/fics/engine.cc @@ -356,7 +356,7 @@ void Engine::setEnabled(bool enable) m_state = StateIdle; emit stateChanged(m_state); } - } else if (not m_channel.isOpen()) { + } else if ((m_state == StateLoginPending || StateLoginFailed) && not m_channel.isOpen()) { m_channel.connectToHost("freechess.org", 5000, QIODevice::ReadWrite); m_channel.waitForConnected();
Fixed with commit 1514dd9e4badb01fd3d5765f1f54de6c7bd8ee96.
Verified, thanks! PS: looking at the patch there is nothing that I would consider "easyfix" for myself. ;)
Well, I doubt a newcomer would have fixed it in the same way as I did (because I merged login and connection handling into one step), but the original bug fix was easy.