Accepting request 631926 from home:wolfi323:branches:KDE:Applications
- Add upstream patch to fix crashes under certain circumstances, e.g. when searching: (kde#397239) * Fix-crash-when-NotificationCollector-does-not-have-Connection.patch OBS-URL: https://build.opensuse.org/request/show/631926 OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/akonadi-server?expand=0&rev=161
This commit is contained in:
parent
2a45af211e
commit
891d7de8cb
@ -0,0 +1,46 @@
|
|||||||
|
From 0297248b0e768516236bdfeb55d04e8d4f4b1c80 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= <dvratil@kde.org>
|
||||||
|
Date: Mon, 27 Aug 2018 23:26:02 +0200
|
||||||
|
Subject: Fix crash when NotificationCollector does not have Connection
|
||||||
|
|
||||||
|
This can happen when the NotificationCollector is invoked internally
|
||||||
|
for instance from the SearchManager.
|
||||||
|
|
||||||
|
BUG: 397239
|
||||||
|
FIXED-IN: 5.9.1
|
||||||
|
---
|
||||||
|
src/server/connection.cpp | 4 +++-
|
||||||
|
src/server/storage/notificationcollector.cpp | 2 +-
|
||||||
|
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/server/connection.cpp b/src/server/connection.cpp
|
||||||
|
index 832cc67..3e1f43d 100644
|
||||||
|
--- a/src/server/connection.cpp
|
||||||
|
+++ b/src/server/connection.cpp
|
||||||
|
@@ -79,7 +79,9 @@ Connection::Connection(quintptr socketDescriptor, QObject *parent)
|
||||||
|
|
||||||
|
Connection *Connection::self()
|
||||||
|
{
|
||||||
|
- Q_ASSERT(sConnectionStore->hasLocalData());
|
||||||
|
+ if (!sConnectionStore->hasLocalData()) {
|
||||||
|
+ return nullptr;
|
||||||
|
+ }
|
||||||
|
return sConnectionStore->localData();
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/src/server/storage/notificationcollector.cpp b/src/server/storage/notificationcollector.cpp
|
||||||
|
index 4c70141..b92ee96 100644
|
||||||
|
--- a/src/server/storage/notificationcollector.cpp
|
||||||
|
+++ b/src/server/storage/notificationcollector.cpp
|
||||||
|
@@ -535,7 +535,7 @@ void NotificationCollector::completeNotification(const Protocol::ChangeNotificat
|
||||||
|
// we emit a notification without it and leave it up to the Monitor
|
||||||
|
// to retrieve the Item on demand - we should have a RID stored in
|
||||||
|
// Akonadi by then.
|
||||||
|
- if (allHaveRID || msg->operation() != Protocol::ItemChangeNotification::Add) {
|
||||||
|
+ if (Connection::self() && (allHaveRID || msg->operation() != Protocol::ItemChangeNotification::Add)) {
|
||||||
|
|
||||||
|
// Prevent transactions inside FetchHelper to recursively call our slot
|
||||||
|
QScopedValueRollback<bool> ignoreTransactions(mIgnoreTransactions);
|
||||||
|
--
|
||||||
|
cgit v0.11.2
|
||||||
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 28 08:35:13 UTC 2018 - wbauer@tmo.at
|
||||||
|
|
||||||
|
- Add upstream patch to fix crashes under certain circumstances,
|
||||||
|
e.g. when searching: (kde#397239)
|
||||||
|
* Fix-crash-when-NotificationCollector-does-not-have-Connection.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Aug 16 21:59:56 UTC 2018 - christophe@krop.fr
|
Thu Aug 16 21:59:56 UTC 2018 - christophe@krop.fr
|
||||||
|
|
||||||
|
@ -31,6 +31,8 @@ Group: System/GUI/KDE
|
|||||||
Url: http://akonadi-project.org
|
Url: http://akonadi-project.org
|
||||||
Source: %{rname}-%{version}.tar.xz
|
Source: %{rname}-%{version}.tar.xz
|
||||||
Source99: akonadi-server-rpmlintrc
|
Source99: akonadi-server-rpmlintrc
|
||||||
|
# PATCH-FIX-UPSTREAM
|
||||||
|
Patch: Fix-crash-when-NotificationCollector-does-not-have-Connection.patch
|
||||||
%if 0%{?suse_version} > 1325
|
%if 0%{?suse_version} > 1325
|
||||||
BuildRequires: libboost_graph-devel
|
BuildRequires: libboost_graph-devel
|
||||||
BuildRequires: libboost_headers-devel
|
BuildRequires: libboost_headers-devel
|
||||||
@ -182,6 +184,7 @@ service.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{rname}-%{version}
|
%setup -q -n %{rname}-%{version}
|
||||||
|
%patch -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?suse_version} < 1330
|
%if 0%{?suse_version} < 1330
|
||||||
|
Loading…
Reference in New Issue
Block a user