All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cdma-voicecall: Fix for crash when unregistering atom
@ 2011-06-13 22:37 Dara Spieker-Doyle
  2011-06-13 22:53 ` Dara Spieker-Doyle
  0 siblings, 1 reply; 2+ messages in thread
From: Dara Spieker-Doyle @ 2011-06-13 22:37 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]

---
 src/cdma-voicecall.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/cdma-voicecall.c b/src/cdma-voicecall.c
index a590063..2bdf850 100644
--- a/src/cdma-voicecall.c
+++ b/src/cdma-voicecall.c
@@ -335,6 +335,18 @@ void ofono_cdma_voicecall_driver_unregister(
 	g_drivers = g_slist_remove(g_drivers, (void *)d);
 }
 
+static void cdma_voicecall_unregister(struct ofono_atom *atom)
+{
+	DBusConnection *conn = ofono_dbus_get_connection();
+	struct ofono_modem *modem = __ofono_atom_get_modem(atom);
+	const char *path = __ofono_atom_get_path(atom);
+
+	g_dbus_unregister_interface(conn, path,
+					OFONO_CDMA_VOICECALL_MANAGER_INTERFACE);
+	ofono_modem_remove_interface(modem,
+					OFONO_CDMA_VOICECALL_MANAGER_INTERFACE);
+}
+
 static void voicecall_manager_remove(struct ofono_atom *atom)
 {
 	struct ofono_cdma_voicecall *vc = __ofono_atom_get_data(atom);
@@ -405,6 +417,8 @@ void ofono_cdma_voicecall_register(struct ofono_cdma_voicecall *vc)
 
 	ofono_modem_add_interface(modem,
 				OFONO_CDMA_VOICECALL_MANAGER_INTERFACE);
+
+	__ofono_atom_register(vc->atom, cdma_voicecall_unregister);
 }
 
 void ofono_cdma_voicecall_remove(struct ofono_cdma_voicecall *vc)
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cdma-voicecall: Fix for crash when unregistering atom
  2011-06-13 22:37 [PATCH] cdma-voicecall: Fix for crash when unregistering atom Dara Spieker-Doyle
@ 2011-06-13 22:53 ` Dara Spieker-Doyle
  0 siblings, 0 replies; 2+ messages in thread
From: Dara Spieker-Doyle @ 2011-06-13 22:53 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 554 bytes --]

On 06/13/2011 03:37 PM, Dara Spieker-Doyle wrote:
> ---
>   src/cdma-voicecall.c |   14 ++++++++++++++
>   1 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/src/cdma-voicecall.c b/src/cdma-voicecall.c
> index a590063..2bdf850 100644
> --- a/src/cdma-voicecall.c
> +++ b/src/cdma-voicecall.c
> @@ -335,6 +335,18 @@ void ofono_cdma_voicecall_driver_unregister(
>   	g_drivers = g_slist_remove(g_drivers, (void *)d);
>   }
>
Please ignore this patch as it contains incorrect formatting. I shall 
resubmit.

Regards
Dara


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-13 22:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-13 22:37 [PATCH] cdma-voicecall: Fix for crash when unregistering atom Dara Spieker-Doyle
2011-06-13 22:53 ` Dara Spieker-Doyle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.