diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2016-11-23 23:54:41 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2017-01-04 14:11:17 +0100 |
commit | 6721c83d073d1a3ae8c0037d69211cf02388bb49 (patch) | |
tree | b47944235f5e2fda2f9a3e6eccba4fa6fc139302 | |
parent | d50059ead40d9e6c18d4ff5cd8daaf2cea965d74 (diff) |
cinterion: use BearerCinterionAuthType when possible
-rw-r--r-- | plugins/cinterion/mm-broadband-bearer-cinterion.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/cinterion/mm-broadband-bearer-cinterion.c b/plugins/cinterion/mm-broadband-bearer-cinterion.c index ebd1a60b..d6704992 100644 --- a/plugins/cinterion/mm-broadband-bearer-cinterion.c +++ b/plugins/cinterion/mm-broadband-bearer-cinterion.c @@ -194,7 +194,7 @@ verify_connection_state_from_swwan_response (GList *result, GError **error) /*****************************************************************************/ /* Connect - Helper Functions*/ -static gint +static BearerCinterionAuthType cinterion_parse_auth_type (MMBearerAllowedAuth mm_auth) { switch (mm_auth) { @@ -321,11 +321,11 @@ setup_ip_settings (Connect3gppContext *ctx) static gchar * build_cinterion_auth_string (Connect3gppContext *ctx) { - const gchar *user = NULL; - const gchar *passwd = NULL; - MMBearerAllowedAuth auth; - gint encoded_auth = BEARER_CINTERION_AUTH_UNKNOWN; - gchar *command = NULL; + const gchar *user = NULL; + const gchar *passwd = NULL; + MMBearerAllowedAuth auth; + BearerCinterionAuthType encoded_auth = BEARER_CINTERION_AUTH_UNKNOWN; + gchar *command = NULL; user = mm_bearer_properties_get_user (mm_base_bearer_peek_config (MM_BASE_BEARER (ctx->self))); passwd = mm_bearer_properties_get_password (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 */ if (encoded_auth == BEARER_CINTERION_AUTH_UNKNOWN) { 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. @@ -351,7 +351,7 @@ build_cinterion_auth_string (Connect3gppContext *ctx) * ERROR * +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, encoded_auth, passwd, |