diff options
author | Richard Röjfors <richard@puffinpack.se> | 2019-10-11 12:29:17 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2019-10-11 12:31:08 -0500 |
commit | 7528a6096d7afb4384193f1df737759135852f41 (patch) | |
tree | 689e5bed752f5a5aa4a0d5a5146af999d1b9578b /src | |
parent | ab9cb3b47c0d89105a7a439eca9593d907b90328 (diff) | |
download | ofono-7528a6096d7afb4384193f1df737759135852f41.tar.gz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/gprs.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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; |