iface-modem: if bands, capabilities or modes change, refresh signal
We also remove the explicit refresh request from the Cinterion plugin, as this is a generic action applicable to all modems that require polling for signal quality and/or access technology.
This commit is contained in:
@@ -852,11 +852,8 @@ allowed_access_technology_update_ready (MMBroadbandModemCinterion *self,
|
|||||||
mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error);
|
mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error);
|
||||||
if (error)
|
if (error)
|
||||||
g_task_return_error (task, error);
|
g_task_return_error (task, error);
|
||||||
else {
|
else
|
||||||
/* Request immediate signal update */
|
|
||||||
mm_iface_modem_refresh_signal (MM_IFACE_MODEM (self));
|
|
||||||
g_task_return_boolean (task, TRUE);
|
g_task_return_boolean (task, TRUE);
|
||||||
}
|
|
||||||
g_object_unref (task);
|
g_object_unref (task);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1139,11 +1136,8 @@ scfg_set_ready (MMBaseModem *self,
|
|||||||
if (!mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error))
|
if (!mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error))
|
||||||
/* Let the error be critical */
|
/* Let the error be critical */
|
||||||
g_simple_async_result_take_error (operation_result, error);
|
g_simple_async_result_take_error (operation_result, error);
|
||||||
else {
|
else
|
||||||
/* Request immediate signal update */
|
|
||||||
mm_iface_modem_refresh_signal (MM_IFACE_MODEM (self));
|
|
||||||
g_simple_async_result_set_op_res_gboolean (operation_result, TRUE);
|
g_simple_async_result_set_op_res_gboolean (operation_result, TRUE);
|
||||||
}
|
|
||||||
|
|
||||||
g_simple_async_result_complete (operation_result);
|
g_simple_async_result_complete (operation_result);
|
||||||
g_object_unref (operation_result);
|
g_object_unref (operation_result);
|
||||||
|
@@ -2058,8 +2058,12 @@ set_current_capabilities_ready (MMIfaceModem *self,
|
|||||||
|
|
||||||
if (!MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_capabilities_finish (self, res, &error))
|
if (!MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_capabilities_finish (self, res, &error))
|
||||||
g_dbus_method_invocation_take_error (ctx->invocation, error);
|
g_dbus_method_invocation_take_error (ctx->invocation, error);
|
||||||
else
|
else {
|
||||||
|
/* Capabilities updated: explicitly refresh signal and access technology */
|
||||||
|
mm_iface_modem_refresh_signal (self);
|
||||||
mm_gdbus_modem_complete_set_current_capabilities (ctx->skeleton, ctx->invocation);
|
mm_gdbus_modem_complete_set_current_capabilities (ctx->skeleton, ctx->invocation);
|
||||||
|
}
|
||||||
|
|
||||||
handle_set_current_capabilities_context_free (ctx);
|
handle_set_current_capabilities_context_free (ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2436,8 +2440,11 @@ handle_set_current_bands_ready (MMIfaceModem *self,
|
|||||||
|
|
||||||
if (!mm_iface_modem_set_current_bands_finish (self, res, &error))
|
if (!mm_iface_modem_set_current_bands_finish (self, res, &error))
|
||||||
g_dbus_method_invocation_take_error (ctx->invocation, error);
|
g_dbus_method_invocation_take_error (ctx->invocation, error);
|
||||||
else
|
else {
|
||||||
|
/* Bands updated: explicitly refresh signal and access technology */
|
||||||
|
mm_iface_modem_refresh_signal (self);
|
||||||
mm_gdbus_modem_complete_set_current_bands (ctx->skeleton, ctx->invocation);
|
mm_gdbus_modem_complete_set_current_bands (ctx->skeleton, ctx->invocation);
|
||||||
|
}
|
||||||
|
|
||||||
handle_set_current_bands_context_free (ctx);
|
handle_set_current_bands_context_free (ctx);
|
||||||
}
|
}
|
||||||
@@ -2752,8 +2759,11 @@ handle_set_current_modes_ready (MMIfaceModem *self,
|
|||||||
|
|
||||||
if (!mm_iface_modem_set_current_modes_finish (self, res, &error))
|
if (!mm_iface_modem_set_current_modes_finish (self, res, &error))
|
||||||
g_dbus_method_invocation_take_error (ctx->invocation, error);
|
g_dbus_method_invocation_take_error (ctx->invocation, error);
|
||||||
else
|
else {
|
||||||
|
/* Modes updated: explicitly refresh signal and access technology */
|
||||||
|
mm_iface_modem_refresh_signal (self);
|
||||||
mm_gdbus_modem_complete_set_current_modes (ctx->skeleton, ctx->invocation);
|
mm_gdbus_modem_complete_set_current_modes (ctx->skeleton, ctx->invocation);
|
||||||
|
}
|
||||||
|
|
||||||
handle_set_current_modes_context_free (ctx);
|
handle_set_current_modes_context_free (ctx);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user