Merge lp:~phablet-team/telepathy-ofono/fix_unit_tests into lp:telepathy-ofono/staging

Proposed by Gustavo Pichorim Boiko
Status: Merged
Approved by: Arthur Mello
Approved revision: 179
Merged at revision: 179
Proposed branch: lp:~phablet-team/telepathy-ofono/fix_unit_tests
Merge into: lp:telepathy-ofono/staging
Diff against target: 44 lines (+10/-3)
3 files modified
mc-plugin/mcp-account-manager-ofono.c (+1/-0)
ofonocallchannel.cpp (+5/-2)
ofonoconferencecallchannel.cpp (+4/-1)
To merge this branch: bzr merge lp:~phablet-team/telepathy-ofono/fix_unit_tests
Reviewer Review Type Date Requested Status
Arthur Mello (community) Approve
Review via email: mp+309394@code.launchpad.net

Commit message

Leave the channels opened for a bit more time to make sure the state change gets fired and delivered correctly.

Description of the change

Leave the channels opened for a bit more time to make sure the state change gets fired and delivered correctly.

To post a comment you must log in.
Revision history for this message
Arthur Mello (artmello) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mc-plugin/mcp-account-manager-ofono.c'
2--- mc-plugin/mcp-account-manager-ofono.c 2016-03-24 17:11:31 +0000
3+++ mc-plugin/mcp-account-manager-ofono.c 2016-10-26 20:43:39 +0000
4@@ -25,6 +25,7 @@
5 #include <locale.h>
6 #include <string.h>
7 #include <stdio.h>
8+#include <stdlib.h>
9 #include <malloc.h>
10 #include "mcp-account-manager-ofono.h"
11
12
13=== modified file 'ofonocallchannel.cpp'
14--- ofonocallchannel.cpp 2015-07-14 17:25:33 +0000
15+++ ofonocallchannel.cpp 2016-10-26 20:43:39 +0000
16@@ -340,8 +340,11 @@
17 reason.reason = Tp::CallStateChangeReasonNoAnswer;
18 }
19 mCallChannel->setCallState(Tp::CallStateEnded, 0, reason, stateDetails);
20- Q_EMIT closed();
21- mBaseChannel->close();
22+ // just in case, leave the channel opened for one more second before unregistering from bus
23+ QTimer::singleShot(1000, [=]() {
24+ Q_EMIT closed();
25+ mBaseChannel->close();
26+ });
27 } else if (state == "active") {
28 qDebug() << "active";
29 mHoldIface->setHoldState(Tp::LocalHoldStateUnheld, Tp::LocalHoldStateReasonNone);
30
31=== modified file 'ofonoconferencecallchannel.cpp'
32--- ofonoconferencecallchannel.cpp 2015-07-14 17:25:33 +0000
33+++ ofonoconferencecallchannel.cpp 2016-10-26 20:43:39 +0000
34@@ -119,7 +119,10 @@
35 reason.DBusReason = "";
36
37 mCallChannel->setCallState(Tp::CallStateEnded, 0, reason, stateDetails);
38- mBaseChannel->close();
39+ // just in case, delay the channel closing by 1 second
40+ QTimer::singleShot(1000, [=]() {
41+ mBaseChannel->close();
42+ });
43 }
44 }
45

Subscribers

People subscribed via source and target branches

to all changes: