iface-modem: allow reporting the previous power state after an update

Let the caller of mm_iface_modem_set_power_state() know which was the
power state in the device before the actual update happened.

This is useful in cases where we want to temporarily switch to a given
power state (e.g. low) before returning to the original power state.
This commit is contained in:
Aleksander Morgado
2024-05-29 08:02:40 +00:00
parent e215f644d6
commit c5b9effdc7
4 changed files with 24 additions and 15 deletions
+1 -1
View File
@@ -908,7 +908,7 @@ shutdown_low_power_ready (MMIfaceModem *modem,
{
g_autoptr(GError) error = NULL;
if (!mm_iface_modem_set_power_state_finish (modem, res, &error))
if (!mm_iface_modem_set_power_state_finish (modem, res, NULL, &error))
mm_obj_info (ctx->self, "changing to low power state failed: %s", error->message);
if (ctx->remove)