Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [RFC PATCH 2/4] modem: add EmergencyMode property
Date: Wed, 08 Dec 2010 04:55:21 -0600	[thread overview]
Message-ID: <4CFF6419.3090402@gmail.com> (raw)
In-Reply-To: <AANLkTinLasRE-FfDkRqwFFW5fpCedKVh2iiuzy1BwyDz@mail.gmail.com>

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

Hi Pekka,

>> So my only major concern left is here actually.  If we activate an
>> emergency call and a set_property(Online, blah) is active, we get into
>> some funny race conditions.  I mentioned these to Pekka on IRC.  But
>> basically the worst one is if we have an Online=False operation pending.
>>  In this case your call proceeds, but then gets terminated shortly
>> thereafter by the offline procedure ;)
> 
> That is a tricky problem. I'd say the most straightforward way is to
> return an error if there is a pending operation and push these
> problems up the stack. In any case dialer has to retry ecall if user
> tries to make the emergency call just after or before moving device to
> offline / removing SIM card / etc. However, I'm not sure if we can
> propagate the error in all cases where ofono_modem_inc_emergency()
> gets called.

There's really no way for the voicecall atom to know that a modem is
undergoing an online / offline transition..

> 
> In order to manage the worst case in best possible manner, I'd check
> for set_online in progress here. Return FALSE from
> ofono_modem_get_online() immediately after the set_online(FALSE) call
> is made. Also, check the emergency state again in after set_online
> callback response. The online/offline watches should be called before
> the set_online() call. (I have no idea what we will do should
> set_online(FALSE) fail)?
> 

So my thinking was essentially along the same lines.  We can check
whether an Online change operation is in progress by peeking at the
pending D-Bus message.  If we're going online, then not triggering
another set_online call and waiting for the online_cb should be sufficient.

If we're going offline, then returning FALSE from ofono_modem_get_online
and re-checking the emergency counter in the offline_cb seems like the
way to go.

I'd like to take care of this completely inside oFono and not bother the
dialer with these details.  Thoughts?

Regards,
-Denis


  reply	other threads:[~2010-12-08 10:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-15 16:57 [PATCH 0/4] Emergency Calls (4th round) Andras Domokos
2010-11-15 16:57 ` [RFC PATCH 1/4] modem: add modem online-offline watch Andras Domokos
2010-11-22 15:58   ` Denis Kenzior
2010-11-15 16:57 ` [RFC PATCH 2/4] modem: add EmergencyMode property Andras Domokos
2010-11-23  8:46   ` Denis Kenzior
2010-11-24 15:42     ` Andras Domokos
2010-11-24 16:20     ` Andras Domokos
2010-12-03 19:19       ` Denis Kenzior
2010-12-07 16:33         ` Pekka Pessi
2010-12-08 10:55           ` Denis Kenzior [this message]
2010-11-15 16:58 ` [RFC PATCH 3/4] modem: move dial_request_cb function Andras Domokos
2010-11-15 16:58 ` [RFC PATCH 4/4] voicecall: add emergency call handling Andras Domokos
2010-11-23  9:00   ` Denis Kenzior
2010-11-24 16:09     ` Andras Domokos
2010-12-07 13:10       ` Aki Niemi
2010-11-24 16:26     ` Andras Domokos
  -- strict thread matches above, loose matches on Subject: below --
2010-11-13 16:33 [PATCH 0/4] Emergency Calls (3rd round) Andras Domokos
2010-11-13 16:33 ` [RFC PATCH 2/4] modem: add EmergencyMode property Andras Domokos

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=4CFF6419.3090402@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox