From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 2/5][RfC] Release calls when SIM is removed.
Date: Thu, 01 Apr 2010 10:52:07 -0500 [thread overview]
Message-ID: <201004011052.08133.denkenz@gmail.com> (raw)
In-Reply-To: <1270011471-6860-1-git-send-email-andrew.zaborowski@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]
Hi Andrew,
> ---
> +static void sim_ready_watch(void *user)
> +{
> + struct ofono_voicecall *vc = user;
> + struct ofono_modem *modem = __ofono_atom_get_modem(vc->atom);
> + struct ofono_atom *sim_atom =
> + __ofono_modem_find_atom(modem, OFONO_ATOM_TYPE_SIM);
> + struct ofono_sim *sim = __ofono_atom_get_data(sim_atom);
> +
> + /* Try both formats, only one or none will work */
> + ofono_sim_read(sim, SIM_EFECC_FILEID,
> + OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
> + ecc_g2_read_cb, vc);
> + ofono_sim_read(sim, SIM_EFECC_FILEID,
> + OFONO_SIM_FILE_STRUCTURE_FIXED,
> + ecc_g3_read_cb, vc);
> +}
This part needs to be done when SIM is inserted. If you refactor the previous
patch, then we should also easily have INSERTED state notifications too and get
this taken care of properly.
> +
> +static void sim_removed_watch(void *user)
> +{
> + struct ofono_voicecall *vc = user;
> +
> + vc->flags |= VOICECALLS_FLAG_MULTI_RELEASE;
> +
> + /* TODO: Don't hang up emergency calls */
> + voicecalls_release_queue(vc, vc->call_list);
> + voicecalls_release_next(vc);
I suggest you only shuffle the emergency numbers here. Let the modem driver
notify which calls have been terminated. If this is wrong we can fix it later,
but sending a CHLD=1X is actually wrong here.
Regards,
-Denis
prev parent reply other threads:[~2010-04-01 15:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-31 4:57 [PATCH 2/5][RfC] Release calls when SIM is removed Andrzej Zaborowski
2010-04-01 15:52 ` Denis Kenzior [this message]
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=201004011052.08133.denkenz@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.