Hello community,

here is the log from the commit of package akonadi-server for openSUSE:Factory 
checked in at 2018-09-03 10:33:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/akonadi-server (Old)
 and      /work/SRC/openSUSE:Factory/.akonadi-server.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "akonadi-server"

Mon Sep  3 10:33:05 2018 rev:47 rq:631927 version:18.08.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/akonadi-server/akonadi-server.changes    
2018-08-22 14:11:19.593068224 +0200
+++ /work/SRC/openSUSE:Factory/.akonadi-server.new/akonadi-server.changes       
2018-09-03 10:33:06.316360665 +0200
@@ -1,0 +2,7 @@
+Tue Aug 28 08:35:13 UTC 2018 - [email protected]
+
+- Add upstream patch to fix crashes under certain circumstances,
+  e.g. when searching: (kde#397239)
+  * Fix-crash-when-NotificationCollector-does-not-have-Connection.patch
+
+-------------------------------------------------------------------

New:
----
  Fix-crash-when-NotificationCollector-does-not-have-Connection.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ akonadi-server.spec ++++++
--- /var/tmp/diff_new_pack.08mv9l/_old  2018-09-03 10:33:06.752361786 +0200
+++ /var/tmp/diff_new_pack.08mv9l/_new  2018-09-03 10:33:06.752361786 +0200
@@ -31,6 +31,8 @@
 Url:            http://akonadi-project.org
 Source:         %{rname}-%{version}.tar.xz
 Source99:       akonadi-server-rpmlintrc
+# PATCH-FIX-UPSTREAM
+Patch:          
Fix-crash-when-NotificationCollector-does-not-have-Connection.patch
 %if 0%{?suse_version} > 1325
 BuildRequires:  libboost_graph-devel
 BuildRequires:  libboost_headers-devel
@@ -182,6 +184,7 @@
 
 %prep
 %setup -q -n %{rname}-%{version}
+%patch -p1
 
 %build
   %if 0%{?suse_version} < 1330

++++++ Fix-crash-when-NotificationCollector-does-not-have-Connection.patch 
++++++
>From 0297248b0e768516236bdfeb55d04e8d4f4b1c80 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= <[email protected]>
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


Reply via email to