cinterion: use BearerCinterionAuthType when possible
This commit is contained in:
@@ -194,7 +194,7 @@ verify_connection_state_from_swwan_response (GList *result, GError **error)
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Connect - Helper Functions*/
|
/* Connect - Helper Functions*/
|
||||||
|
|
||||||
static gint
|
static BearerCinterionAuthType
|
||||||
cinterion_parse_auth_type (MMBearerAllowedAuth mm_auth)
|
cinterion_parse_auth_type (MMBearerAllowedAuth mm_auth)
|
||||||
{
|
{
|
||||||
switch (mm_auth) {
|
switch (mm_auth) {
|
||||||
@@ -324,7 +324,7 @@ build_cinterion_auth_string (Connect3gppContext *ctx)
|
|||||||
const gchar *user = NULL;
|
const gchar *user = NULL;
|
||||||
const gchar *passwd = NULL;
|
const gchar *passwd = NULL;
|
||||||
MMBearerAllowedAuth auth;
|
MMBearerAllowedAuth auth;
|
||||||
gint encoded_auth = BEARER_CINTERION_AUTH_UNKNOWN;
|
BearerCinterionAuthType encoded_auth = BEARER_CINTERION_AUTH_UNKNOWN;
|
||||||
gchar *command = NULL;
|
gchar *command = NULL;
|
||||||
|
|
||||||
user = mm_bearer_properties_get_user (mm_base_bearer_peek_config (MM_BASE_BEARER (ctx->self)));
|
user = mm_bearer_properties_get_user (mm_base_bearer_peek_config (MM_BASE_BEARER (ctx->self)));
|
||||||
@@ -340,7 +340,7 @@ build_cinterion_auth_string (Connect3gppContext *ctx)
|
|||||||
/* Default to no authentication if not specified */
|
/* Default to no authentication if not specified */
|
||||||
if (encoded_auth == BEARER_CINTERION_AUTH_UNKNOWN) {
|
if (encoded_auth == BEARER_CINTERION_AUTH_UNKNOWN) {
|
||||||
encoded_auth = BEARER_CINTERION_AUTH_NONE;
|
encoded_auth = BEARER_CINTERION_AUTH_NONE;
|
||||||
mm_dbg ("Unable to detect authentication type. Defaulting to:%i", encoded_auth);
|
mm_dbg ("Unable to detect authentication type. Defaulting to 'none'");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: Haven't tested this as I can't get a hold of a SIM w/ this feature atm.
|
/* TODO: Haven't tested this as I can't get a hold of a SIM w/ this feature atm.
|
||||||
@@ -351,7 +351,7 @@ build_cinterion_auth_string (Connect3gppContext *ctx)
|
|||||||
* ERROR
|
* ERROR
|
||||||
* +CME ERROR: <err>
|
* +CME ERROR: <err>
|
||||||
*/
|
*/
|
||||||
command = g_strdup_printf ("^SGAUTH=%u,%i,%s,%s",
|
command = g_strdup_printf ("^SGAUTH=%u,%d,%s,%s",
|
||||||
usb_interface_configs[ctx->usb_interface_config_index].pdp_context,
|
usb_interface_configs[ctx->usb_interface_config_index].pdp_context,
|
||||||
encoded_auth,
|
encoded_auth,
|
||||||
passwd,
|
passwd,
|
||||||
|
Reference in New Issue
Block a user