Revert "iface-modem-signal: send a query after threshold set up"

This reverts commit 17ed63637f.

We were reusing the signal_state_query_ready() callback in the wrong
way.
This commit is contained in:
Aleksander Morgado
2023-05-10 19:58:07 +00:00
parent 17ed63637f
commit 45c7ad1e56
2 changed files with 4 additions and 19 deletions

View File

@@ -6759,18 +6759,6 @@ modem_signal_load_values (MMIfaceModemSignal *self,
task = g_task_new (self, NULL, callback, user_data); task = g_task_new (self, NULL, callback, user_data);
if (mbim_device_check_ms_mbimex_version (device, 2, 0)) {
message = mbim_message_signal_state_query_new (NULL);
mbim_device_command (device,
message,
5,
NULL,
(GAsyncReadyCallback)signal_state_query_ready,
task);
mbim_message_unref (message);
return;
}
if (MM_BROADBAND_MODEM_MBIM (self)->priv->is_atds_signal_supported) { if (MM_BROADBAND_MODEM_MBIM (self)->priv->is_atds_signal_supported) {
message = mbim_message_atds_signal_query_new (NULL); message = mbim_message_atds_signal_query_new (NULL);
mbim_device_command (device, mbim_device_command (device,

View File

@@ -249,7 +249,7 @@ load_values_ready (MMIfaceModemSignal *self,
} }
static gboolean static gboolean
query_signal_values (MMIfaceModemSignal *self) polling_context_cb (MMIfaceModemSignal *self)
{ {
MM_IFACE_MODEM_SIGNAL_GET_INTERFACE (self)->load_values ( MM_IFACE_MODEM_SIGNAL_GET_INTERFACE (self)->load_values (
self, self,
@@ -285,10 +285,10 @@ polling_restart (MMIfaceModemSignal *self)
/* Start/restart polling */ /* Start/restart polling */
if (priv->timeout_source) if (priv->timeout_source)
g_source_remove (priv->timeout_source); g_source_remove (priv->timeout_source);
priv->timeout_source = g_timeout_add_seconds (priv->rate, (GSourceFunc) query_signal_values, self); priv->timeout_source = g_timeout_add_seconds (priv->rate, (GSourceFunc) polling_context_cb, self);
/* Also launch right away */ /* Also launch right away */
query_signal_values (self); polling_context_cb (self);
} }
/*****************************************************************************/ /*****************************************************************************/
@@ -311,11 +311,8 @@ setup_thresholds_ready (MMIfaceModemSignal *self,
if (!MM_IFACE_MODEM_SIGNAL_GET_INTERFACE (self)->setup_thresholds_finish (self, res, &error)) if (!MM_IFACE_MODEM_SIGNAL_GET_INTERFACE (self)->setup_thresholds_finish (self, res, &error))
g_task_return_error (task, error); g_task_return_error (task, error);
else { else
/* launch a query right away */
query_signal_values (self);
g_task_return_boolean (task, TRUE); g_task_return_boolean (task, TRUE);
}
g_object_unref (task); g_object_unref (task);
} }