summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gprs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gprs.c b/src/gprs.c
index de172979..c7b181f5 100644
--- a/src/gprs.c
+++ b/src/gprs.c
@@ -2568,12 +2568,6 @@ void ofono_gprs_status_notify(struct ofono_gprs *gprs, int status)
gprs->status = status;
- if (status != NETWORK_REGISTRATION_STATUS_REGISTERED &&
- status != NETWORK_REGISTRATION_STATUS_ROAMING) {
- gprs_attached_update(gprs);
- return;
- }
-
/*
* If we're already taking action, e.g. attaching or detaching, then
* ignore this notification for now, we will take appropriate action
@@ -2582,6 +2576,12 @@ void ofono_gprs_status_notify(struct ofono_gprs *gprs, int status)
if (gprs->flags & GPRS_FLAG_ATTACHING)
return;
+ if (status != NETWORK_REGISTRATION_STATUS_REGISTERED &&
+ status != NETWORK_REGISTRATION_STATUS_ROAMING) {
+ ofono_gprs_detached_notify(gprs);
+ return;
+ }
+
/* We registered without being powered */
if (gprs->powered == FALSE)
goto detach;