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

Proposed by Tiago Salem Herrmann
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 937
Merged at revision: 940
Proposed branch: lp:~tiagosh/telephony-service/rtm-14.09-fix-1421091
Merge into: lp:telephony-service/rtm-14.09
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/rtm-14.09-fix-1421091
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+249694@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
Ricardo Salveti (rsalveti) wrote :

Code looks good, just need to test it (trying to get a silo).

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-28 14:51:24 +0000
3+++ libtelephonyservice/callmanager.cpp 2015-02-13 17:36:59 +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