Bug 176813

Summary: JJ Incorrect error codes in error() calls in KIO slaves lead to error message garbage
Product: [Frameworks and Libraries] kdelibs Reporter: George Kiagiadakis <mail>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: cullmann, egorov
Priority: NOR Keywords: junior-jobs
Version: 4.1   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description George Kiagiadakis 2008-12-03 19:07:37 UTC
Version:           4.1.81 (using Devel)
Compiler:          gcc version 4.3.2 (Debian 4.3.2-1) 
OS:                Linux
Installed from:    Compiled sources

In kde 4.1.x, when using imap in kmail and the remote host was not found due to some dns problem, it showed the error message "Unknown host mail.foo.com". In kde 4.1.80, it shows "Unknown host Host not found".

To reproduce:
1) in kmail, setup an imap account that points to an inexistent host
2) try to fetch mail for this account.
3) a KMessageBox should popup saying this strange error message.

I am not filing this as a kmail bug because I tried using kmail 1.10.3 (from kde 4.1.3) with kdelibs 4.1.80 and it showed the wrong message again. I guess this is in kio_imap code.
Comment 1 Thomas McGuire 2008-12-05 16:46:10 UTC
This is a general KIO problem, and not slave-specific (although many slaves have their own incorrect error messages. In particular, the host not found message comes from TCPSlaveBase, I think.

The problem is that the slaves (and SlaveBase and TCPSlaveBase) call error() with the incorrect error ID, which is not compatible with KIO::buildErrorString(). See the documentation of SlaveBase::error().

This needs somebody with a bit of time on his hands to wade through all error() calls in the slaves and in SlaveBase/TCPSlaveBase (there are many) and fix them.
Comment 2 Boris Egorov 2015-01-07 07:50:28 UTC
Is this bug still here? It is not reproducible anymore.
It looks like TCPSlaveBase uses correct error IDs with "host: socketError" as error string. Calls to error() from other slaves looks correct too.
Comment 3 Christoph Cullmann 2024-05-10 22:20:59 UTC
Then let's close it.