iface-modem-3gpp-profile-manager: improve logging of user request to set profile

This commit is contained in:
Aleksander Morgado
2022-09-13 13:18:55 +00:00
parent 4534d6bb8d
commit f75be75e5c

View File

@@ -1033,16 +1033,21 @@ set_profile_ready (MMIfaceModem3gppProfileManager *self,
{
GError *error = NULL;
g_autoptr(MM3gppProfile) profile_stored = NULL;
g_autoptr(GVariant) profile_dictionary = NULL;
profile_stored = mm_iface_modem_3gpp_profile_manager_set_profile_finish (self, res, &error);
if (!profile_stored)
if (!profile_stored) {
mm_obj_warn (self, "failed setting 3GPP profile: %s", error->message);
g_dbus_method_invocation_take_error (ctx->invocation, error);
else {
g_autoptr(GVariant) profile_dictionary = NULL;
profile_dictionary = mm_3gpp_profile_get_dictionary (profile_stored);
mm_gdbus_modem3gpp_profile_manager_complete_set (ctx->skeleton, ctx->invocation, profile_dictionary);
handle_set_context_free (ctx);
return;
}
mm_obj_info (self, "3GPP profile set:");
mm_log_3gpp_profile (self, MM_LOG_LEVEL_INFO, " ", profile_stored);
profile_dictionary = mm_3gpp_profile_get_dictionary (profile_stored);
mm_gdbus_modem3gpp_profile_manager_complete_set (ctx->skeleton, ctx->invocation, profile_dictionary);
handle_set_context_free (ctx);
}
@@ -1082,6 +1087,9 @@ handle_set_auth_ready (MMBaseModem *self,
return;
}
mm_obj_info (self, "processing user request to set 3GPP profile...");
mm_log_3gpp_profile (self, MM_LOG_LEVEL_INFO, " ", profile_requested);
index_field = mm_gdbus_modem3gpp_profile_manager_get_index_field (ctx->skeleton);
/* Don't call the class callback directly, use the common helper method