From 60092ed7ea717c24495ddc00119b0dce982912b1 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 1 Aug 2017 10:11:02 +0200 Subject: broadband-modem: single g_object_get() call to read multiple properties --- src/mm-broadband-modem.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index 2d2f6509..eb127b58 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -10103,10 +10103,7 @@ initialize_step (GTask *task) gboolean is_sim_hot_swap_configured = FALSE; g_object_get (ctx->self, - MM_IFACE_MODEM_SIM_HOT_SWAP_SUPPORTED, &is_sim_hot_swap_supported, - NULL); - - g_object_get (ctx->self, + MM_IFACE_MODEM_SIM_HOT_SWAP_SUPPORTED, &is_sim_hot_swap_supported, MM_IFACE_MODEM_SIM_HOT_SWAP_CONFIGURED, &is_sim_hot_swap_configured, NULL); @@ -10166,13 +10163,8 @@ initialize_step (GTask *task) (MmGdbusModem*)ctx->self->priv->modem_dbus_skeleton); g_object_get (ctx->self, - MM_IFACE_MODEM_SIM_HOT_SWAP_SUPPORTED, - &is_sim_hot_swap_supported, - NULL); - - g_object_get (ctx->self, - MM_IFACE_MODEM_SIM_HOT_SWAP_CONFIGURED, - &is_sim_hot_swap_configured, + MM_IFACE_MODEM_SIM_HOT_SWAP_SUPPORTED, &is_sim_hot_swap_supported, + MM_IFACE_MODEM_SIM_HOT_SWAP_CONFIGURED, &is_sim_hot_swap_configured, NULL); if (reason == MM_MODEM_STATE_FAILED_REASON_SIM_MISSING) { -- cgit v1.2.3-70-g09d2