[kdepim-runtime] akonadi_maildispatcher_agent crashes when sending email (kde#283364)
Rex Dieter
rdieter at fedoraproject.org
Thu Oct 13 03:03:33 UTC 2011
commit 84ff38014710c282d249b456ae72b287cd61284a
Author: Rex Dieter <rdieter at fedoraproject.org>
Date: Wed Oct 12 22:10:51 2011 -0500
akonadi_maildispatcher_agent crashes when sending email (kde#283364)
kdepim-runtime-4.7.2-kde283364.patch | 37 ++++++++++++++++++++++++++++++++++
kdepim-runtime.spec | 7 +++++-
2 files changed, 43 insertions(+), 1 deletions(-)
---
diff --git a/kdepim-runtime-4.7.2-kde283364.patch b/kdepim-runtime-4.7.2-kde283364.patch
new file mode 100644
index 0000000..af71468
--- /dev/null
+++ b/kdepim-runtime-4.7.2-kde283364.patch
@@ -0,0 +1,37 @@
+commit dcf16b6c1b2614d32a46d0deacf53fc1d3adcadb
+Author: David Faure <faure at kde.org>
+Date: Fri Oct 7 21:36:52 2011 +0200
+
+ Fix crash when the collection list from the collectionfetch job is empty.
+
+ Reported (and fix tested) by arkascha on irc.
+
+diff --git a/agents/maildispatcher/sendjob.cpp b/agents/maildispatcher/sendjob.cpp
+index 2d59a2b..52b0e27 100644
+--- a/agents/maildispatcher/sendjob.cpp
++++ b/agents/maildispatcher/sendjob.cpp
+@@ -301,15 +301,20 @@ void SendJob::Private::doPostJob( bool transportSuccess, const QString &transpor
+ void SendJob::Private::slotSentMailCollectionFetched(KJob* job)
+ {
+ Akonadi::Collection fetchCol;
+- if( job->error() ) {
++ bool ok = false;
++ if( !job->error() ) {
++ const CollectionFetchJob *const fetchJob = qobject_cast<CollectionFetchJob*>( job );
++ if ( !fetchJob->collections().isEmpty() ) {
++ fetchCol = fetchJob->collections().first();
++ ok = true;
++ }
++ }
++ if ( !ok ) {
+ if ( !SpecialMailCollections::self()->hasDefaultCollection( SpecialMailCollections::SentMail ) ) {
+ abortPostJob();
+ return;
+ }
+ fetchCol = SpecialMailCollections::self()->defaultCollection( SpecialMailCollections::SentMail );
+- } else {
+- const CollectionFetchJob *const fetchJob = qobject_cast<CollectionFetchJob*>( job );
+- fetchCol = fetchJob->collections().first();
+ }
+ currentJob = new ItemMoveJob( item, fetchCol, q );
+ QObject::connect( currentJob, SIGNAL( result( KJob* ) ), q, SLOT( postJobResult( KJob* ) ) );
diff --git a/kdepim-runtime.spec b/kdepim-runtime.spec
index 4b122e3..e7114a4 100644
--- a/kdepim-runtime.spec
+++ b/kdepim-runtime.spec
@@ -5,7 +5,7 @@ Name: kdepim-runtime
Summary: KDE PIM Runtime Environment
Epoch: 1
Version: 4.7.2
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2
Group: Applications/Productivity
@@ -23,6 +23,8 @@ Patch1: kdepim-runtime-4.7.1-sqlite-support.patch
## upstream patches
# http://bugs.kde.org/283467
Patch100: kdepim-runtime-4.7.2-kde283467.patch
+# http://bugs.kde.org/283364
+Patch101: kdepim-runtime-4.7.2-kde283364.patch
Provides: kdepim4-runtime = %{version}-%{release}
@@ -151,6 +153,9 @@ rm -rf %{buildroot}
%changelog
+* Wed Oct 12 2011 Rex Dieter <rdieter at fedoraproject.org> 4.7.2-3
+- akonadi_maildispatcher_agent crashes when sending email (kde#283364)
+
* Sat Oct 08 2011 Rex Dieter <rdieter at fedoraproject.org> 4.7.2-2
- Kmail has duplicated folders after migration from previous version (kde#283467)
More information about the scm-commits
mailing list