From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: crash when unplugged modem when it was still initializing
Date: Tue, 24 Jan 2012 11:35:56 -0600 [thread overview]
Message-ID: <4F1EEBFC.1020203@gmail.com> (raw)
In-Reply-To: <CAHiDW_E10MmuxyvO3v9vXzCsA8A49WPULS=Q3C-pL4G98eRjmA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 502 bytes --]
On 01/24/2012 03:33 PM, Jussi Kukkonen wrote:
> On Tue, Jan 24, 2012 at 11:19 PM, Jussi Kukkonen
> <jussi.kukkonen@intel.com> wrote:
>> Hi,
>> I happened to unplug my dongle quite soon after starting ofono. It
>> promptly aborted.
>
> and it just happened again with no relation to unplugging devices or
> starting ofonod s othose were red herrings. In fact I hadn't touched
> anything for a moment: connmand and ofonod were both running.
>
Try the following patch.
Regards,
-Denis
[-- Attachment #2: 0001-sim-Fix-crash-due-to-uninitialized-spn_watch.patch --]
[-- Type: text/plain, Size: 852 bytes --]
>From 43cb98b7134cff765e10db2c94402695f795b8ff Mon Sep 17 00:00:00 2001
From: Denis Kenzior <denkenz@gmail.com>
Date: Tue, 24 Jan 2012 11:33:16 -0600
Subject: [PATCH] sim: Fix crash due to uninitialized spn_watch
---
src/sim.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/sim.c b/src/sim.c
index 703e0db..eb25e07 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -2530,6 +2530,14 @@ static void sim_spn_close(struct ofono_sim *sim)
__ofono_watchlist_free(sim->spn_watches);
sim->spn_watches = NULL;
+ /*
+ * We have not initialized SPN logic at all yet, either because
+ * no netreg / gprs atom has been needed or we have not reached the
+ * post_sim state
+ */
+ if (sim->ef_spn_watch == 0)
+ return;
+
ofono_sim_remove_file_watch(sim->context, sim->ef_spn_watch);
sim->ef_spn_watch = 0;
--
1.7.3.4
next prev parent reply other threads:[~2012-01-24 17:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-24 21:19 crash when unplugged modem when it was still initializing Jussi Kukkonen
2012-01-24 21:33 ` Jussi Kukkonen
2012-01-24 17:35 ` Denis Kenzior [this message]
2012-01-25 13:07 ` Jussi Kukkonen
2012-01-25 14:23 ` Jussi Kukkonen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F1EEBFC.1020203@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.