mirror of git://git.sysmocom.de/ofono
gprs: update attached on netreg updates when running LTE
There was a race condition where a context might be registered before the netreg status updates to LTE. The code took for granted the context is activated after the technology update. With this change, any order is is accepted.
This commit is contained in:
parent
ab9cb3b47c
commit
7528a6096d
|
@ -1721,12 +1721,17 @@ static void gprs_netreg_update(struct ofono_gprs *gprs)
|
|||
|
||||
DBG("attach: %u, driver_attached: %u", attach, gprs->driver_attached);
|
||||
|
||||
if (on_lte(gprs))
|
||||
if (on_lte(gprs)) {
|
||||
/*
|
||||
* For LTE we set attached status only on successful
|
||||
* context activation.
|
||||
*
|
||||
* The context could potentially be registered before the
|
||||
* netreg update is received.
|
||||
*/
|
||||
return;
|
||||
gprs_attached_update(gprs);
|
||||
return;
|
||||
}
|
||||
|
||||
if (gprs->driver_attached == attach)
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue