Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH 1/3] message-waiting: check for NULL argument
@ 2011-01-21 12:44 Pekka.Pessi
  2011-01-21 12:44 ` [PATCH 2/3] message-waiting: add allocation checks Pekka.Pessi
  2011-01-26 22:47 ` [PATCH 1/3] message-waiting: check for NULL argument Denis Kenzior
  0 siblings, 2 replies; 6+ messages in thread
From: Pekka.Pessi @ 2011-01-21 12:44 UTC (permalink / raw)
  To: ofono

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

From: Pekka Pessi <Pekka.Pessi@nokia.com>

---
 src/message-waiting.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/message-waiting.c b/src/message-waiting.c
index d8bfe34..0e376b6 100644
--- a/src/message-waiting.c
+++ b/src/message-waiting.c
@@ -926,11 +926,18 @@ static void message_waiting_unregister(struct ofono_atom *atom)
 
 void ofono_message_waiting_register(struct ofono_message_waiting *mw)
 {
-	DBusConnection *conn = ofono_dbus_get_connection();
-	const char *path = __ofono_atom_get_path(mw->atom);
-	struct ofono_modem *modem = __ofono_atom_get_modem(mw->atom);
+	DBusConnection *conn;
+	const char *path;
+	struct ofono_modem *modem;
 	struct ofono_atom *sim_atom;
 
+	if (mw == NULL)
+		return;
+
+	conn = ofono_dbus_get_connection();
+	modem = __ofono_atom_get_modem(mw->atom);
+	path = __ofono_atom_get_path(mw->atom);
+
 	if (!g_dbus_register_interface(conn, path,
 					OFONO_MESSAGE_WAITING_INTERFACE,
 					message_waiting_methods,
-- 
1.7.1


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

end of thread, other threads:[~2011-01-26 22:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-21 12:44 [PATCH 1/3] message-waiting: check for NULL argument Pekka.Pessi
2011-01-21 12:44 ` [PATCH 2/3] message-waiting: add allocation checks Pekka.Pessi
2011-01-21 12:44   ` [PATCH 3/3] doc: fix a kill-yank error Pekka.Pessi
2011-01-21 12:56     ` Marcel Holtmann
2011-01-26 22:51   ` [PATCH 2/3] message-waiting: add allocation checks Denis Kenzior
2011-01-26 22:47 ` [PATCH 1/3] message-waiting: check for NULL argument Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox