aboutsummaryrefslogtreecommitdiff
path: root/src/mm-iface-modem-3gpp.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksandermj@google.com>2022-07-29 17:44:14 +0200
committerAleksander Morgado <aleksander@aleksander.es>2022-08-04 14:26:33 +0000
commitf58dcc832bc525b5be7bc2c757d3ac08651774c1 (patch)
treec30a8f38658562eaedf33b34369538ee767eb9bd /src/mm-iface-modem-3gpp.c
parentd82f0d5371ad9fde50bfa21976af0b9bc7a6d663 (diff)
iface-modem-3gpp: update packet service state in the interface
The skeleton property will be update automatically as they're bound.
Diffstat (limited to 'src/mm-iface-modem-3gpp.c')
-rw-r--r--src/mm-iface-modem-3gpp.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c
index f6c9eb1a..ac35c52b 100644
--- a/src/mm-iface-modem-3gpp.c
+++ b/src/mm-iface-modem-3gpp.c
@@ -2008,21 +2008,6 @@ mm_iface_modem_3gpp_update_location (MMIfaceModem3gpp *self,
/*****************************************************************************/
static void
-update_packet_service_state (MMIfaceModem3gpp *self,
- MMModem3gppPacketServiceState state)
-{
- g_autoptr(MmGdbusModem3gppSkeleton) skeleton = NULL;
-
- g_object_get (self,
- MM_IFACE_MODEM_3GPP_DBUS_SKELETON, &skeleton,
- NULL);
- if (skeleton)
- mm_gdbus_modem3gpp_set_packet_service_state (MM_GDBUS_MODEM3GPP (skeleton), state);
-}
-
-/*****************************************************************************/
-
-static void
update_registration_reload_current_registration_info_ready (MMIfaceModem3gpp *self,
GAsyncResult *res,
gpointer user_data)
@@ -2043,13 +2028,11 @@ update_registration_reload_current_registration_info_ready (MMIfaceModem3gpp *se
mm_modem_3gpp_registration_state_get_string (priv->state_5gs),
mm_modem_3gpp_registration_state_get_string (new_state));
- /* Packet service state refresh */
- update_packet_service_state (self, get_consolidated_packet_service_state (self));
-
- /* The property in the interface is bound to the property
+ /* The properties in the interface are bound to the properties
* in the skeleton, so just updating here is enough */
g_object_set (self,
- MM_IFACE_MODEM_3GPP_REGISTRATION_STATE, new_state,
+ MM_IFACE_MODEM_3GPP_REGISTRATION_STATE, new_state,
+ MM_IFACE_MODEM_3GPP_PACKET_SERVICE_STATE, get_consolidated_packet_service_state (self),
NULL);
mm_iface_modem_update_subsystem_state (MM_IFACE_MODEM (self),
@@ -2068,13 +2051,11 @@ update_non_registered_state (MMIfaceModem3gpp *self,
/* Not registered neither in home nor roaming network */
mm_iface_modem_3gpp_clear_current_operator (self);
- /* Packet service detached */
- update_packet_service_state (self, MM_MODEM_3GPP_PACKET_SERVICE_STATE_DETACHED);
-
/* The property in the interface is bound to the property
* in the skeleton, so just updating here is enough */
g_object_set (self,
- MM_IFACE_MODEM_3GPP_REGISTRATION_STATE, new_state,
+ MM_IFACE_MODEM_3GPP_REGISTRATION_STATE, new_state,
+ MM_IFACE_MODEM_3GPP_PACKET_SERVICE_STATE, MM_MODEM_3GPP_PACKET_SERVICE_STATE_DETACHED,
NULL);
mm_iface_modem_update_subsystem_state (