[Kde-pim] [PATCH] Fix kio_sieve shutdown
Frank Osterfeld
frank at kdab.net
Sun Jun 15 22:54:50 BST 2008
Sieve experts,
here is a patch against enterprise4 (but should also apply to trunk)
for Bug 163695 [1]. It prevents KIO::Sieve jobs from hanging around
when KMail is closed and eating 100% CPU. Works for me (TM),
please review.
[1] http://bugs.kde.org/show_bug.cgi?id=163695
--
Frank Osterfeld -- frank at kdab.net
Klarälvdalens Datakonsult AB, Platform-independent software
solutions
-------------- next part --------------
Index: sieve/sieve.cpp
===================================================================
--- sieve/sieve.cpp (revision 820510)
+++ sieve/sieve.cpp (working copy)
@@ -1110,7 +1110,9 @@
// read data from the server
char buffer[SIEVE_DEFAULT_RECIEVE_BUFFER];
- readLine(buffer, SIEVE_DEFAULT_RECIEVE_BUFFER - 1);
+ const ssize_t numRead = readLine(buffer, SIEVE_DEFAULT_RECIEVE_BUFFER - 1);
+ if ( numRead < 0 )
+ return false;
buffer[SIEVE_DEFAULT_RECIEVE_BUFFER-1] = '\0';
// strip LF/CR
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list