fix apn check

pull/11657/head
mudassar-ublox 2019-10-09 12:31:53 +05:00
parent 1798c246cc
commit c8ade9032b
1 changed files with 2 additions and 2 deletions

View File

@ -126,14 +126,14 @@ nsapi_error_t UBLOX_AT::config_authentication_parameters()
nsapi_error_t err; nsapi_error_t err;
char imsi[MAX_IMSI_LENGTH + 1]; char imsi[MAX_IMSI_LENGTH + 1];
if (apn == NULL) { if (ubx_context->get_apn() == NULL) {
err = get_imsi(imsi); err = get_imsi(imsi);
if (err == NSAPI_ERROR_OK) { if (err == NSAPI_ERROR_OK) {
config = (char *)apnconfig(imsi); config = (char *)apnconfig(imsi);
} }
ubx_context->get_next_credentials(&config);
} }
ubx_context->get_next_credentials(&config);
apn = ubx_context->get_apn(); apn = ubx_context->get_apn();
pwd = ubx_context->get_pwd(); pwd = ubx_context->get_pwd();
uname = ubx_context->get_uname(); uname = ubx_context->get_uname();