From 665eee829b8a3e811940d6031de60a1c52bcdbd2 Mon Sep 17 00:00:00 2001 From: mudassar-ublox Date: Wed, 9 Oct 2019 12:31:53 +0500 Subject: [PATCH] fix apn check --- features/cellular/framework/targets/UBLOX/AT/UBLOX_AT.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/cellular/framework/targets/UBLOX/AT/UBLOX_AT.cpp b/features/cellular/framework/targets/UBLOX/AT/UBLOX_AT.cpp index 1f116f6f86..3472c77e49 100644 --- a/features/cellular/framework/targets/UBLOX/AT/UBLOX_AT.cpp +++ b/features/cellular/framework/targets/UBLOX/AT/UBLOX_AT.cpp @@ -126,14 +126,14 @@ nsapi_error_t UBLOX_AT::config_authentication_parameters() nsapi_error_t err; char imsi[MAX_IMSI_LENGTH + 1]; - if (apn == NULL) { + if (ubx_context->get_apn() == NULL) { err = get_imsi(imsi); if (err == NSAPI_ERROR_OK) { config = (char *)apnconfig(imsi); } + ubx_context->get_next_credentials(&config); } - ubx_context->get_next_credentials(&config); apn = ubx_context->get_apn(); pwd = ubx_context->get_pwd(); uname = ubx_context->get_uname();