mirror of git://git.sysmocom.de/ofono
gprs: Remove prior attaching state logic
Commit1fd419e5b4
and0167c3339c
introduced logic that treated ofono_gprs_cid_activated as an 'attaching' state. Since gprs_attached_update now guarantees that we will not get attached without having a context activated in LTE, this is not needed anymore. It also potentially interferes in case the driver was actually attaching.
This commit is contained in:
parent
b50ff27d3f
commit
06de0c3067
19
src/gprs.c
19
src/gprs.c
|
@ -913,7 +913,6 @@ static void pri_read_settings_callback(const struct ofono_error *error,
|
||||||
{
|
{
|
||||||
struct pri_context *pri_ctx = data;
|
struct pri_context *pri_ctx = data;
|
||||||
struct ofono_gprs_context *gc = pri_ctx->context_driver;
|
struct ofono_gprs_context *gc = pri_ctx->context_driver;
|
||||||
struct ofono_gprs *gprs = pri_ctx->gprs;
|
|
||||||
DBusConnection *conn = ofono_dbus_get_connection();
|
DBusConnection *conn = ofono_dbus_get_connection();
|
||||||
dbus_bool_t value;
|
dbus_bool_t value;
|
||||||
|
|
||||||
|
@ -938,19 +937,11 @@ static void pri_read_settings_callback(const struct ofono_error *error,
|
||||||
|
|
||||||
value = pri_ctx->active;
|
value = pri_ctx->active;
|
||||||
|
|
||||||
gprs->flags &= ~GPRS_FLAG_ATTACHING;
|
gprs_set_attached_property(pri_ctx->gprs, TRUE);
|
||||||
|
|
||||||
gprs->driver_attached = TRUE;
|
|
||||||
gprs_set_attached_property(gprs, TRUE);
|
|
||||||
|
|
||||||
ofono_dbus_signal_property_changed(conn, pri_ctx->path,
|
ofono_dbus_signal_property_changed(conn, pri_ctx->path,
|
||||||
OFONO_CONNECTION_CONTEXT_INTERFACE,
|
OFONO_CONNECTION_CONTEXT_INTERFACE,
|
||||||
"Active", DBUS_TYPE_BOOLEAN, &value);
|
"Active", DBUS_TYPE_BOOLEAN, &value);
|
||||||
|
|
||||||
if (gprs->flags & GPRS_FLAG_RECHECK) {
|
|
||||||
gprs->flags &= ~GPRS_FLAG_RECHECK;
|
|
||||||
gprs_netreg_update(gprs);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static DBusMessage *pri_set_apn(struct pri_context *ctx, DBusConnection *conn,
|
static DBusMessage *pri_set_apn(struct pri_context *ctx, DBusConnection *conn,
|
||||||
|
@ -2039,14 +2030,6 @@ void ofono_gprs_cid_activated(struct ofono_gprs *gprs, unsigned int cid,
|
||||||
DBUS_TYPE_STRING, &apn);
|
DBUS_TYPE_STRING, &apn);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Prevent ofono_gprs_status_notify from changing the 'attached'
|
|
||||||
* state until after the context has been set to 'active' in
|
|
||||||
* the pri_read_settings_callback; this prevents a race where
|
|
||||||
* the connection manager sees the modem as attached before there
|
|
||||||
* is an active context.
|
|
||||||
*/
|
|
||||||
gprs->flags |= GPRS_FLAG_ATTACHING;
|
|
||||||
|
|
||||||
gc->driver->read_settings(gc, cid, pri_read_settings_callback, pri_ctx);
|
gc->driver->read_settings(gc, cid, pri_read_settings_callback, pri_ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue