summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubtsov <s.e.golubtsov@gmail.com>2022-09-04 10:16:59 +0200
committerDenis Kenzior <denkenz@gmail.com>2022-09-06 09:48:02 -0500
commita3a75e752e307d61c0ba3561af6b29f3c8ec915a (patch)
treed289291eaecbdfc6d1d5981c634468bf0b10af84
parente69f525d6eacb74447b92e3116a6008f02150343 (diff)
downloadofono-a3a75e752e307d61c0ba3561af6b29f3c8ec915a.tar.gz
lte: switch auth to NONE if other options cannot be used
If the user name or user name together with the password for an AP are not provided the NONE auth method should be used
-rw-r--r--drivers/atmodem/lte.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/atmodem/lte.c b/drivers/atmodem/lte.c
index 4157b02f..fc4deae4 100644
--- a/drivers/atmodem/lte.c
+++ b/drivers/atmodem/lte.c
@@ -82,7 +82,8 @@ static void at_lte_set_default_attach_info_cb(gboolean ok, GAtResult *result,
auth_method = ldd->pending_info.auth_method;
/* change the authentication method if the parameters are invalid */
- if (!*ldd->pending_info.username || !*ldd->pending_info.password)
+ if (!*ldd->pending_info.username ||
+ (!*ldd->pending_info.username && !*ldd->pending_info.password))
auth_method = OFONO_GPRS_AUTH_METHOD_NONE;
len = snprintf(buf, buflen, "AT+CGAUTH=0,%d",