From a3a75e752e307d61c0ba3561af6b29f3c8ec915a Mon Sep 17 00:00:00 2001 From: Sergei Golubtsov Date: Sun, 4 Sep 2022 10:16:59 +0200 Subject: 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 --- drivers/atmodem/lte.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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", -- cgit v1.2.1