diff options
author | Sergei Golubtsov <s.e.golubtsov@gmail.com> | 2022-09-04 10:16:58 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2022-09-06 09:46:58 -0500 |
commit | e69f525d6eacb74447b92e3116a6008f02150343 (patch) | |
tree | a7d88974d7bed03777ab0c90c8a8b1e5292fa348 | |
parent | eddeaaaec86229c93a0b74c4fb9f10f92b7d83ee (diff) | |
download | ofono-e69f525d6eacb74447b92e3116a6008f02150343.tar.gz |
mbpi: switch to auth NONE if other options cannot be used
If a user name or user name together with a password for an AP
are not provided the NONE auth method should be used
-rw-r--r-- | plugins/mbpi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/mbpi.c b/plugins/mbpi.c index ae92c762..7af64d1d 100644 --- a/plugins/mbpi.c +++ b/plugins/mbpi.c @@ -395,6 +395,10 @@ static void gsm_end(GMarkupParseContext *context, const gchar *element_name, if (ap == NULL) return; + /* select authentication method NONE if others cannot be used */ + if (!ap->username || (!ap->username && !ap->password)) + ap->auth_method = OFONO_GPRS_AUTH_METHOD_NONE; + if (gsm->allow_duplicates == FALSE) { GSList *l; |