Merge lp:~tiagosh/telepathy-ofono/no_route_change_on_disconnect into lp:telepathy-ofono

Proposed by Tiago Salem Herrmann on 2013-09-24
Status: Merged
Approved by: Tony Espy on 2013-09-24
Approved revision: 43
Merged at revision: 43
Proposed branch: lp:~tiagosh/telepathy-ofono/no_route_change_on_disconnect
Merge into: lp:telepathy-ofono
Diff against target: 19 lines (+9/-0)
1 file modified
connection.cpp (+9/-0)
To merge this branch: bzr merge lp:~tiagosh/telepathy-ofono/no_route_change_on_disconnect
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve on 2013-09-24
Tony Espy 2013-09-24 Approve on 2013-09-24
Review via email:

Commit message

Avoid changing to the wrong audio route on "disconnect".

Description of the change

Avoid changing to the wrong audio route on "disconnect".

To post a comment you must log in.
Tony Espy (awe) wrote :

Seems like a fair amount of duplicate code there... however I'll let it slide for now.

Also, is there really a case where call->state() will return an empty string?

I'll approve, but this code seems ripe for a code review post 13.10 ( especially once we start working on multi call support ).

review: Approve
Tiago Salem Herrmann (tiagosh) wrote :

onCallRemoved(QString objpath) is also connected to that slot, in such case the call does not exist anymore in ofono, thus the state is empty and we ignore it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'connection.cpp'
2--- connection.cpp 2013-08-22 07:22:28 +0000
3+++ connection.cpp 2013-09-24 18:01:46 +0000
4@@ -804,6 +804,15 @@
5 call->deleteLater();
6 return;
7 }
8+ if (call->state() == "disconnected") {
9+ enable_normal();
10+ call->deleteLater();
11+ return;
12+ }
13+ if (call->state().isEmpty()) {
14+ call->deleteLater();
15+ return;
16+ }
17 call->deleteLater();
18 }
19 }


People subscribed via source and target branches