Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH v2] fix can't attach GPRS issue
Date: Sun, 05 Jun 2011 21:00:13 -0500	[thread overview]
Message-ID: <4DEC34AD.4080703@gmail.com> (raw)
In-Reply-To: <0E7E5CACD8E9F248AA009C292CC772A0755BE2@ALA-MBA.corp.ad.wrs.com>

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

Hi Caiwen,

> gprs_netreg_update() is the only place to change CGATT automatically.
> 
> Following are the code of gprs_netreg_update().
> 
> 	ofono_bool_t attach;
> 
> 	attach = gprs->netreg_status == NETWORK_REGISTRATION_STATUS_REGISTERED;
> 
> 	attach = attach || (gprs->roaming_allowed &&
> 		gprs->netreg_status == NETWORK_REGISTRATION_STATUS_ROAMING);
> 
> 	attach = attach && gprs->powered;
> 
> 	if (gprs->driver_attached == attach)
> 		return;
> 
> As my comment above, because gprs->netreg_status is 1(NETWORK_REGISTRATION_STATUS_REGISTERED)
> and gprs->driver_attached is TRUE. So (gprs->driver_attached == attach). This function always
> return here, unless, the value of gprs->netreg_status or gprs->driver_attached is changed.
> 

This is by design, I don't see anything inherently wrong here.
Remember, gprs_netreg_update is called from many places and this sanity
check is needed.

> As gprs_netreg_update() always returns here, so gprs->driver_attached won't be changed.
> So unless the network registration status changes to unregistered then registered again,
> it won't attach GPRS again.
> 

But the CREG status is being toggled like crazy. Once CREG goes to
unregistered / searching we detach and set driver_attached to FALSE.  It
sounds like your explanation isn't correct.

Regards,
-Denis

      reply	other threads:[~2011-06-06  2:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-10  6:38 [PATCH v2] fix can't attach GPRS issue Caiwen Zhang
2011-06-02  7:51 ` Denis Kenzior
2011-06-03  2:15   ` Zhang, Caiwen
2011-06-02  9:13     ` Denis Kenzior
2011-06-03  3:42       ` Zhang, Caiwen
2011-06-02 12:22         ` Denis Kenzior
2011-06-07  7:24           ` Zhang, Caiwen
2011-06-06  2:00             ` 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=4DEC34AD.4080703@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