diff options
author | som <somashekhar.puttagangaiah@intel.com> | 2022-04-04 20:30:48 +0530 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2022-04-05 08:01:48 +0000 |
commit | 1fec1cd3c225fd418a2a20f726c93b570a187805 (patch) | |
tree | 41b2aa3748cb0b98f979bf5bddb1f3b3de73e4d8 /src/mm-iface-modem-3gpp-profile-manager.c | |
parent | 19f389949c2e15eb52a27d7b6236ef8a9ab76e97 (diff) |
profile-manager: profile-id and apn-type check not required for user settings
When the user provides the profile parameter, as per the MM documentation
profile-id is an optional parameter. So with the fix the profile-id
check in input is removed. apn-type is also optional when the user
provides the settings. This check is also removed as part of the fix.
Diffstat (limited to 'src/mm-iface-modem-3gpp-profile-manager.c')
-rw-r--r-- | src/mm-iface-modem-3gpp-profile-manager.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/mm-iface-modem-3gpp-profile-manager.c b/src/mm-iface-modem-3gpp-profile-manager.c index d2b11fec..ad14131d 100644 --- a/src/mm-iface-modem-3gpp-profile-manager.c +++ b/src/mm-iface-modem-3gpp-profile-manager.c @@ -1016,8 +1016,6 @@ handle_set_auth_ready (MMBaseModem *self, const gchar *index_field; GError *error = NULL; g_autoptr(MM3gppProfile) profile_requested = NULL; - gint profile_id = MM_3GPP_PROFILE_ID_UNKNOWN; - MMBearerApnType apn_type = MM_BEARER_APN_TYPE_NONE; if (!mm_base_modem_authorize_finish (self, res, &error)) { g_dbus_method_invocation_take_error (ctx->invocation, error); @@ -1047,24 +1045,6 @@ handle_set_auth_ready (MMBaseModem *self, } index_field = mm_gdbus_modem3gpp_profile_manager_get_index_field (ctx->skeleton); - if (g_strcmp0 (index_field, "profile-id") == 0) { - profile_id = mm_3gpp_profile_get_profile_id (profile_requested); - if (profile_id == MM_3GPP_PROFILE_ID_UNKNOWN) { - g_dbus_method_invocation_return_error_literal (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS, - "Missing index field ('profile-id') in profile settings"); - handle_set_context_free (ctx); - return; - } - } else if (g_strcmp0 (index_field, "apn-type") == 0) { - apn_type = mm_3gpp_profile_get_apn_type (profile_requested); - if (apn_type == MM_BEARER_APN_TYPE_NONE) { - g_dbus_method_invocation_return_error_literal (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS, - "Missing index field ('apn-type') in profile settings"); - handle_set_context_free (ctx); - return; - } - } else - g_assert_not_reached (); /* Don't call the class callback directly, use the common helper method * that is also used by other internal operations. */ |