Skip to contentSkip to conversation

voicecall: send CallRemoved for calls when voicecall atom is unregistered

PATCH In review Mike Brudevold 2 participants 5 messages Apr 18, 2012 – Apr 20, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 voicecall: send CallRemoved for calls when voicecall atom is unregistered

From: Michael Brudevold <[email protected]>

The CallRemoved signal was not being sent for existing calls when the voicecall atom was unregistered. An example of this is the lack of a CallRemoved signal when an HFP AG is disconnected due to SLC timeout while a call is active.

---
 src/voicecall.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
src/voicecall.c +4 -1
index 104b600..263f1ee 100644
@@ -2699,8 +2699,11 @@ static void voicecall_unregister(struct ofono_atom *atom)
 	if (vc->dial_req)
 		dial_request_finish(vc);
 
-	for (l = vc->call_list; l; l = l->next)
+	for (l = vc->call_list; l; l = l->next) {
+		voicecalls_emit_call_removed(vc, l->data);
+
 		voicecall_dbus_unregister(vc, l->data);
+	}
 
 	g_slist_free(vc->call_list);
 	vc->call_list = NULL;
Signature · 1 line
1.7.5.4
#1 lore raw

Hi Mike,

Quoted 14 lines · Mike Brudevold

From: Michael Brudevold <[email protected]>

The CallRemoved signal was not being sent for existing calls when the voicecall atom was unregistered. An example of this is the lack of a CallRemoved signal when an HFP AG is disconnected due to SLC timeout while a call is active.

---
 src/voicecall.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
src/voicecall.c +0 -0
index 104b600..263f1ee 100644

src/voicecall.c static void voicecall_unregister(struct ofono_atom *atom) · line 2707

Quoted 10 lines
src/voicecall.c +4 -1
@@ -2699,8 +2699,11 @@ static void voicecall_unregister(struct ofono_atom *atom)
 	if (vc->dial_req)
 		dial_request_finish(vc);
 
-	for (l = vc->call_list; l; l = l->next)
+	for (l = vc->call_list; l; l = l->next) {
+		voicecalls_emit_call_removed(vc, l->data);
+
 		voicecall_dbus_unregister(vc, l->data);
+	}
 

In some respect this is on purpose, the application should listen to the PropertyChanged on the main Modem object and keep track of Interfaces property. e.g. if the VoiceCallManager goes away the application can pretty much assume that all calls are gone.

I could use some more convincing that this is really needed...

Regards,
-Denis

Quoted 2 lines
src/voicecall.c +0 -0
 	g_slist_free(vc->call_list);
 	vc->call_list = NULL;
author
#2 lore raw

Hi Denis,

Quoted 33 lines · Denis Kenzior

Hi Mike,

Quoted 14 lines · Mike Brudevold

From: Michael Brudevold <[email protected]>

The CallRemoved signal was not being sent for existing calls when the voicecall atom was unregistered. An example of this is the lack of a CallRemoved signal when an HFP AG is disconnected due to SLC timeout while a call is active.
---
 src/voicecall.c |    5 ++++-

 1 files changed, 4 insertions(+), 1 deletions(-)
src/voicecall.c +0 -0
index 104b600..263f1ee 100644

src/voicecall.c static void voicecall_unregister(struct ofono_atom *atom) · line 2707

Quoted 10 lines
src/voicecall.c +4 -1
@@ -2699,8 +2699,11 @@ static void voicecall_unregister(struct ofono_atom *atom)
       if (vc->dial_req)
               dial_request_finish(vc);
 
-     for (l = vc->call_list; l; l = l->next)
+     for (l = vc->call_list; l; l = l->next) {
+             voicecalls_emit_call_removed(vc, l->data);
+
               voicecall_dbus_unregister(vc, l->data);
+     }
 

In some respect this is on purpose, the application should listen to the PropertyChanged on the main Modem object and keep track of Interfaces property.  e.g. if the VoiceCallManager goes away the application can pretty much assume that all calls are gone.

Quoted 1 line

I could use some more convincing that this is really needed...

The only reason I added it is 4 hours of debugging my GUI and ofono to figure out why the GUI didn't notice the D-Bus path for the voice call was no longer around. The documentation for CallRemoved says "Signal that is sent when a voice call has been released." This implies it should be sent every time it is released. If you update the documentation to make it clear that this is not always the case, then it's fine by me.

Mike

Quoted 7 lines

Regards,
-Denis

Quoted 2 lines
src/voicecall.c +0 -0
       g_slist_free(vc->call_list);
       vc->call_list = NULL;
#3 lore raw

Hi Mike,

Quoted 9 lines

The only reason I added it is 4 hours of debugging my GUI and ofono to figure out why the GUI didn't notice the D-Bus path for the voice call was no longer around. The documentation for CallRemoved says "Signal that is sent when a voice call has been released." This implies it should be sent every time it is released. If you update the documentation to make it clear that this is not always the case, then it's fine by me.

Please check that commit 7f51df4d satisfies your requirements.

Regards,
-Denis

author
#4 lore raw

Hi Denis,

Quoted 12 lines · Denis Kenzior

Hi Mike,

Quoted 9 lines

The only reason I added it is 4 hours of debugging my GUI and ofono to figure out why the GUI didn't notice the D-Bus path for the voice call was no longer around.  The documentation for CallRemoved says "Signal that is sent when a voice call has been released."  This implies it should be sent every time it is released.  If you update the documentation to make it clear that this is not always the case, then it's fine by me.

Quoted 1 line

Please check that commit 7f51df4d satisfies your requirements.

Looks good, thanks!

Mike

Quoted 3 lines

Regards,
-Denis