Hi,

changes in ofono_modem_set_powered() by this commit:
http://git.kernel.org/?p=network/ofono/ofono.git;a=commit;h=b0f0e248e9c945239e0d6dd2ea5a37cb8227e51c
are now causing isimodem driver to crash:

ofonod[13171]: src/modem.c:ofono_modem_driver_register() driver: 0x80ab578, name: isimodem ofonod[13171]: drivers/isimodem/isimodem.c:netlink_status_cb() PhoNet is up, addr=0x10, idx=0x14
ofonod[13171]: src/modem.c:ofono_modem_create() isimodem

Program received signal SIGSEGV, Segmentation fault.
0x0807c197 in ofono_modem_set_powered ()
(gdb) bt
#0  0x0807c197 in ofono_modem_set_powered ()
#1  0x08054ca8 in netlink_status_cb ()
#2  0x08052d84 in g_pn_nl_process ()
#3  0x00312d5b in ?? () from /lib/libglib-2.0.so.0
#4  0x002dbe78 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#5  0x002df720 in ?? () from /lib/libglib-2.0.so.0
#6  0x002dfb8f in g_main_loop_run () from /lib/libglib-2.0.so.0
#7  0x0807afeb in main ()


The patch to fix the problem is attached.

Alex
>From 596586106c630ed32f8314012fb4ce5bdbfea06a Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <[email protected]>
Date: Tue, 8 Dec 2009 14:36:45 +0200
Subject: [PATCH] Fix a crash during isimodem initialization

---
 src/modem.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/modem.c b/src/modem.c
index 3a6a163..829e3c8 100644
--- a/src/modem.c
+++ b/src/modem.c
@@ -577,12 +577,12 @@ void ofono_modem_set_powered(struct ofono_modem *modem, ofono_bool_t powered)
 						OFONO_MODEM_INTERFACE,
 						"Powered", DBUS_TYPE_BOOLEAN,
 						&dbus_powered);
+			if (powered) {
+				if (modem->driver->pre_sim)
+					modem->driver->pre_sim(modem);
+			}
 		}
 
-		if (powered) {
-			if (modem->driver->pre_sim)
-				modem->driver->pre_sim(modem);
-		}
 	}
 
 	if (powering_down) {
-- 
1.6.3.3

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to