From: Richard Röjfors <[email protected]>

Since its registered context is a condition for being attached
when running LTE, we might need to update the attached state
when a context is deactivated. Otherwise we might remain
attached, and connection managers (at least connman) start
to hammer us to connect a context, eventhough it happens
automatically in LTE.
---
 src/gprs.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/gprs.c b/src/gprs.c
index 94d13f82..cb31e2d2 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -2738,11 +2738,12 @@ void ofono_gprs_context_deactivated(struct 
ofono_gprs_context *gc,
         * If "Attached" property was about to be signalled as TRUE but there
         * were still active contexts, try again to signal "Attached" property
         * to registered applications after active contexts have been released.
+        *
+        * ... or in the case of LTE where the attached state were a registered
+        * context is a condition for being attached
         */
-       if (gc->gprs->flags & GPRS_FLAG_ATTACHED_UPDATE) {
-               gc->gprs->flags &= ~GPRS_FLAG_ATTACHED_UPDATE;
-               gprs_attached_update(gc->gprs);
-       }
+       gc->gprs->flags &= ~GPRS_FLAG_ATTACHED_UPDATE;
+       gprs_attached_update(gc->gprs);
 }
 
 int ofono_gprs_context_driver_register(
-- 
2.20.1

_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to