{
struct ofono_gprs *gprs = data;
- if (error->type == OFONO_ERROR_TYPE_NO_ERROR) {
- gprs->driver_attached = !gprs->driver_attached;
+ if (error->type == OFONO_ERROR_TYPE_NO_ERROR)
gprs_attached_update(gprs);
- }
+ else
+ gprs->driver_attached = !gprs->driver_attached;
if (gprs->driver->registration_status) {
gprs->driver->registration_status(gprs, registration_status_cb,
gprs->flags |= GPRS_FLAG_ATTACHING;
gprs->driver->set_attached(gprs, attach, gprs_attach_callback, gprs);
+ gprs->driver_attached = attach;
}
static void netreg_status_changed(int status, int lac, int ci, int tech,
int status, int lac, int ci, int tech)
{
/* If we are not attached and haven't tried to attach, ignore */
- if (gprs->driver_attached == FALSE &&
- (gprs->flags & GPRS_FLAG_ATTACHING) == 0)
+ if (gprs->driver_attached == FALSE)
return;
if (gprs->status != status)