File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
features/netsocket/cellular/generic_modem_driver Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -540,18 +540,12 @@ nsapi_error_t PPPCellularInterface::connect()
540
540
nsapi_error_t retcode;
541
541
bool success;
542
542
bool did_init = false ;
543
+ const char *apn_config = NULL ;
543
544
544
545
if (dev_info.ppp_connection_up ) {
545
546
return NSAPI_ERROR_IS_CONNECTED;
546
547
}
547
548
548
- const char *apn_config = NULL ;
549
- #if MBED_CONF_PPP_CELL_IFACE_APN_LOOKUP
550
- if (!set_credentials_api_used) {
551
- apn_config = apnconfig (dev_info.imsi );
552
- }
553
- #endif
554
-
555
549
do {
556
550
retry_init:
557
551
@@ -586,6 +580,12 @@ nsapi_error_t PPPCellularInterface::connect()
586
580
return NSAPI_ERROR_NO_CONNECTION;
587
581
}
588
582
583
+ #if MBED_CONF_PPP_CELL_IFACE_APN_LOOKUP
584
+ if (!apn_config) {
585
+ apn_config = apnconfig (dev_info.imsi );
586
+ }
587
+ #endif
588
+
589
589
/* Check if user want skip SIM pin checking on boot up */
590
590
if (set_sim_pin_check_request) {
591
591
retcode = do_sim_pin_check (_at, _pin);
@@ -611,6 +611,7 @@ nsapi_error_t PPPCellularInterface::connect()
611
611
_apn = _APN_GET (apn_config);
612
612
_uname = _APN_GET (apn_config);
613
613
_pwd = _APN_GET (apn_config);
614
+ tr_info (" Looked up APN %s." , _apn);
614
615
}
615
616
#endif
616
617
You can’t perform that action at this time.
0 commit comments