diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-10-26 16:55:03 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-10-26 16:55:03 -0500 |
commit | bc72cca91b070f61c0cecb0090937eb758e91b24 (patch) | |
tree | 2ffa115db0e7e0a3170c867f3ff59fbeca562e65 /src | |
parent | e0603f0c68d133374cf0e6fb05bb3e105e5546a4 (diff) | |
download | ofono-bc72cca91b070f61c0cecb0090937eb758e91b24.tar.bz2 |
Fix: notify_attached was only used when detached
The standard only specifies that the context might have been detached by
the network / mobile equipment. Not attached.
Diffstat (limited to 'src')
-rw-r--r-- | src/gprs.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -894,14 +894,18 @@ static GDBusSignalTable manager_signals[] = { { } }; -void ofono_gprs_attach_notify(struct ofono_gprs *gprs, int attached) +void ofono_gprs_detached_notify(struct ofono_gprs *gprs) { - if (gprs->driver_attached != attached && - !(gprs->flags & GPRS_FLAG_ATTACHING)) { - gprs->driver_attached = attached; + if (gprs->driver_attached == FALSE) + return; - gprs_netreg_update(gprs); - } + gprs->driver_attached = FALSE; + + gprs_attached_update(gprs); + + /* TODO: The network forced a detach, we should wait for some time + * and try to re-attach + */ } static void set_registration_status(struct ofono_gprs *gprs, int status) |