Merge lp:~tiagosh/telephony-service/fix-1421091 into lp:telephony-service

Proposed by Tiago Salem Herrmann
Status: Merged
Approved by: Bill Filler
Approved revision: 1031
Merged at revision: 1032
Proposed branch: lp:~tiagosh/telephony-service/fix-1421091
Merge into: lp:telephony-service
Diff against target: 22 lines (+3/-2)
1 file modified
libtelephonyservice/callmanager.cpp (+3/-2)
To merge this branch: bzr merge lp:~tiagosh/telephony-service/fix-1421091
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+251274@code.launchpad.net

Commit message

Do not create instance of GreeterContacts to avoid dealock with unity.

Description of the change

Do not create instance of GreeterContacts to avoid dealock with unity.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libtelephonyservice/callmanager.cpp'
2--- libtelephonyservice/callmanager.cpp 2015-01-19 21:14:26 +0000
3+++ libtelephonyservice/callmanager.cpp 2015-02-27 15:24:26 +0000
4@@ -23,7 +23,6 @@
5 #include "callmanager.h"
6 #include "callentry.h"
7 #include "telepathyhelper.h"
8-#include "greetercontacts.h"
9 #include "accountentry.h"
10
11 #include <TelepathyQt/ContactManager>
12@@ -273,7 +272,9 @@
13 // for the availability of calls.
14 // this is done only to get the live call view on clients as soon as possible, even before the
15 // telepathy observer is configured
16- if (!GreeterContacts::instance()->isGreeterMode()) {
17+ // Also, we have to avoid creating instances of GreeterContacts here to query if we are in greeter mode,
18+ // otherwise we might end up with a deadlock: unity -> telephony-service -> unity
19+ if (qgetenv("XDG_SESSION_CLASS") != "greeter") {
20 QDBusInterface *phoneAppHandler = TelepathyHelper::instance()->handlerInterface();
21 QDBusReply<bool> reply = phoneAppHandler->call("HasCalls");
22 if (reply.isValid()) {

Subscribers

People subscribed via source and target branches