Thread (2 messages) 2 messages, 2 authors, 2010-01-11
STALE6043d

[PATCH] Don't pass down NULL path to dbus if no modem.

From: Zhu Yanhai <hidden>
Date: 2010-01-11 07:36:26
Subsystem: the rest · Maintainer: Linus Torvalds

We shouldn't pass down NULL object path to dbus if there's no modem,
which is a common case on many netbooks.

Signed-off-by: Zhu Yanhai <redacted>
---
 audio/telephony-ofono.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/audio/telephony-ofono.c b/audio/telephony-ofono.c
index 2778cfc..2970e43 100644
--- a/audio/telephony-ofono.c
+++ b/audio/telephony-ofono.c
@@ -579,6 +579,11 @@ static void list_modem_reply(DBusPendingCall *call, void *user_data)
 						modem_obj_path);
 		dbus_message_iter_next(&sub);
 	}
+	if (modem_obj_path == NULL)
+	{
+		debug("no modem found.\n");	
+		goto done;
+	}
 
 	ret = get_registration_and_signal_status();
 	if (ret < 0)
-- 
1.6.2.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help