Merge pull request #14 from monich/jb55900

[ofono] Pulled in a bug fix from upstream. JB#55900
This commit is contained in:
Slava Monich
2021-10-28 13:25:46 +03:00
committed by GitHub

View File

@@ -1983,6 +1983,19 @@ static bool have_read_settings(struct ofono_gprs *gprs)
}
#endif
static void pri_context_signal_active(struct pri_context *ctx)
{
DBusConnection *conn;
dbus_bool_t value;
value = ctx->active;
conn = ofono_dbus_get_connection();
ofono_dbus_signal_property_changed(conn, ctx->path,
OFONO_CONNECTION_CONTEXT_INTERFACE,
"Active", DBUS_TYPE_BOOLEAN, &value);
}
static void release_active_contexts(struct ofono_gprs *gprs)
{
GSList *l;
@@ -2006,7 +2019,9 @@ static void release_active_contexts(struct ofono_gprs *gprs)
gc->driver->detach_shutdown(gc, ctx->context.cid);
/* Make sure the context is properly cleared */
pri_reset_context_settings(ctx);
release_context(ctx);
pri_context_signal_active(ctx);
}
}
@@ -2672,8 +2687,6 @@ static void gprs_deactivate_for_all(const struct ofono_error *error,
{
struct pri_context *ctx = data;
struct ofono_gprs *gprs = ctx->gprs;
DBusConnection *conn;
dbus_bool_t value;
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
__ofono_dbus_pending_reply(&gprs->pending,
@@ -2683,12 +2696,7 @@ static void gprs_deactivate_for_all(const struct ofono_error *error,
pri_reset_context_settings(ctx);
release_context(ctx);
value = ctx->active;
conn = ofono_dbus_get_connection();
ofono_dbus_signal_property_changed(conn, ctx->path,
OFONO_CONNECTION_CONTEXT_INTERFACE,
"Active", DBUS_TYPE_BOOLEAN, &value);
pri_context_signal_active(ctx);
gprs_deactivate_next(gprs);
}