aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Palmas <dnlplm@gmail.com>2022-07-15 16:46:07 +0200
committerDaniele Palmas <dnlplm@gmail.com>2022-07-15 16:47:34 +0200
commitfbf497c7014b939354640beecb924d3886ec3048 (patch)
tree69dd5bcc60508152dea73e6d39045da7c82e6e97
parent7464940971ded3d550217872b42fef9f3120b1bf (diff)
iface-modem-3gpp-profile-manager: add default index_field
If check_support functions are not defined when implementing iface-modem-3gpp-profile-manager, set "profile-id" as default index_field.
-rw-r--r--src/mm-iface-modem-3gpp-profile-manager.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mm-iface-modem-3gpp-profile-manager.c b/src/mm-iface-modem-3gpp-profile-manager.c
index 1ab01487..999273e1 100644
--- a/src/mm-iface-modem-3gpp-profile-manager.c
+++ b/src/mm-iface-modem-3gpp-profile-manager.c
@@ -1608,7 +1608,10 @@ profile_manager_list_profiles_check_ready (MMIfaceModem3gppProfileManager *self,
if (!mm_iface_modem_3gpp_profile_manager_list_profiles_finish (self, res, NULL, &error))
mm_obj_dbg (self, "profile management support check failed: couldn't load profile list: %s", error->message);
else {
- /* profile management is supported! */
+ /* profile management is supported!
+ * We are here because the modem type did not define the check_support functions,
+ * but we need anyway to set index_field, so let's use "profile-id" as default */
+ mm_gdbus_modem3gpp_profile_manager_set_index_field (ctx->skeleton, "profile-id");
g_object_set_qdata (G_OBJECT (self), supported_quark, GUINT_TO_POINTER (TRUE));
}