From fbf497c7014b939354640beecb924d3886ec3048 Mon Sep 17 00:00:00 2001 From: Daniele Palmas Date: Fri, 15 Jul 2022 16:46:07 +0200 Subject: 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. --- src/mm-iface-modem-3gpp-profile-manager.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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)); } -- cgit v1.2.3-70-g09d2