Bug 176813 - JJ Incorrect error codes in error() calls in KIO slaves lead to error message garbage
Summary: JJ Incorrect error codes in error() calls in KIO slaves lead to error message...
Status: CONFIRMED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 4.1
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2008-12-03 19:07 UTC by George Kiagiadakis
Modified: 2015-01-07 07:50 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.