libmm-glib: allow 'none' authentication with more values
Specifying 'none' is really not exclusive. We may want to say that the modem can either authenticate with a given protocol, or otherwise just try without authentication. The reality is that 'none' itself is usually always given in the connection settings.
This commit is contained in:
@@ -462,16 +462,6 @@ mm_common_get_allowed_auth_from_string (const gchar *str,
|
|||||||
allowed_auth = MM_BEARER_ALLOWED_AUTH_UNKNOWN;
|
allowed_auth = MM_BEARER_ALLOWED_AUTH_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 'none' is a special value which, if given, must be given alone */
|
|
||||||
if (allowed_auth & MM_BEARER_ALLOWED_AUTH_NONE &&
|
|
||||||
allowed_auth != MM_BEARER_ALLOWED_AUTH_NONE) {
|
|
||||||
g_set_error (error,
|
|
||||||
MM_CORE_ERROR,
|
|
||||||
MM_CORE_ERROR_INVALID_ARGS,
|
|
||||||
"Allowed auth 'none' cannot be given along with other values");
|
|
||||||
allowed_auth = MM_BEARER_ALLOWED_AUTH_UNKNOWN;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_type_class_unref (flags_class);
|
g_type_class_unref (flags_class);
|
||||||
g_strfreev (strings);
|
g_strfreev (strings);
|
||||||
return allowed_auth;
|
return allowed_auth;
|
||||||
|
@@ -887,7 +887,7 @@ mm_bearer_allowed_auth_to_qmi_authentication (MMBearerAllowedAuth auth)
|
|||||||
{
|
{
|
||||||
QmiWdsAuthentication out;
|
QmiWdsAuthentication out;
|
||||||
|
|
||||||
out = 0;
|
out = QMI_WDS_AUTHENTICATION_NONE;
|
||||||
if (auth & MM_BEARER_ALLOWED_AUTH_PAP)
|
if (auth & MM_BEARER_ALLOWED_AUTH_PAP)
|
||||||
out |= QMI_WDS_AUTHENTICATION_PAP;
|
out |= QMI_WDS_AUTHENTICATION_PAP;
|
||||||
if (auth & MM_BEARER_ALLOWED_AUTH_CHAP)
|
if (auth & MM_BEARER_ALLOWED_AUTH_CHAP)
|
||||||
|
Reference in New Issue
Block a user