[RFC] GPRS context setup and teardown (doc/dataconnectionmanager-api.txt)

andrzej zaborowski balrogg at gmail.com
Sat Oct 24 23:39:27 PDT 2009


2009/10/25 Denis Kenzior <denkenz at gmail.com>:
>> > Lets suppose status=registered arrives and we're already attached.  Here
>> > attached will be set to FALSE, Attached property will be set to false and
>> > emitted.  gprs_netreg_update will presumably reset Attached back to True.
>>
>> Now I see it and you're absolutely right to be alerted, I set
>> "attached" to the reverse of what it should be set to.  We're attached
>> when we're either in REGISTERED or ROAMING state.  If I had done it
>> right then the logic would look simple (I suppose):
>
> I still don't believe that it works.  Suppose we're attached and registered.
> Now we get an indication that we're in 'searching' state.  set attach to true,
> compare with stored value (true).  Ah, don't do anything -> not good.

I tried to say that I agree that current code is wrong, but assuming
the variable "attached" was set correctly, this would not happen (see
attached patch).

Now that I think of it if the current status is 'searching' then
possibly there's no point calling driver->set_attached (see second
patch).

> Resetting Powered in the core leads to strange situations where after coming
> from an overseas trip you'd need to reset Powered back to on.  I would find
> that annoying.
>
> The nice thing is I don't think we need to play the attach/detach dance.  We
> can take advantage of the netreg atom's information.  If we're roaming there,
> we will be roaming on GPRS as well.  If we're registered there, then we should
> try to attach.

That's a great idea, I will send a patch separately.

Regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-interpretation-of-new-GPRS-registration-status-s.patch
Type: text/x-patch
Size: 942 bytes
Desc: not available
URL: <http://lists.ofono.org/pipermail/ofono/attachments/20091025/9042b7b5/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Don-t-ask-driver-to-attach-GPRS-if-modem-is-already.patch
Type: text/x-patch
Size: 1203 bytes
Desc: not available
URL: <http://lists.ofono.org/pipermail/ofono/attachments/20091025/9042b7b5/attachment-0001.bin>


More information about the ofono mailing list