[Bug 288268] imap agents crash when network connection gets closed

David Faure faure at kde.org
Tue Jan 17 22:13:45 GMT 2012


https://bugs.kde.org/show_bug.cgi?id=288268


David Faure <faure at kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED




--- Comment #24 from David Faure <faure kde org>  2012-01-17 22:13:44 ---
Git commit 757f464e5de7f992d0bfcb90dc97d4ea40df47d5 by David Faure.
Committed on 17/01/2012 at 23:02.
Pushed by dfaure into branch 'KDE/4.8'.

Rework handling of connection failures, to fix crashes.

Testcase: unplugging my network cable, waiting for timeouts, plugging it
back again later, check mail.

* Port from deprecated connectionLost to stateChanged, which has the major
benefit of not confusing "failure to connect" with "we lost our connection"
(due to KIMAP::Session emitting both signals for compat reasons).

* Failure to connect is now handled in the result slot for the LoginJob,
rather than via the connectionFailed signal, since the first one is called
anyway.

* Make sure we emit connectDone on error, even if m_initialConnectDone is true,
so that the resource sets itself to offline (rather than it attempting the
same task over and over again!).

* Don't set the resource status to Broken when it's simply offline
(login failure due to "could not connect" is handled separately now)

* Make sure not to pop up a password dialog when couldn't connect; this
is different from "we could connect but the server refused login".

Requires kdepimlibs commit acdb0f7e50 for ERR_COULD_NOT_CONNECT.

FIXED-IN: 4.8

M  +5    -0    resources/imap/imapresource.cpp
M  +27   -35   resources/imap/sessionpool.cpp
M  +5    -4    resources/imap/sessionpool.h
M  +33   -0    resources/imap/tests/imaptestbase.h
M  +29   -0    resources/imap/tests/testsessionpool.cpp

http://commits.kde.org/kdepim-runtime/757f464e5de7f992d0bfcb90dc97d4ea40df47d5

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the Kdepim-bugs mailing list