File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
features/cellular/framework/AT Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -458,7 +458,28 @@ nsapi_error_t AT_CellularContext::do_activate_context()
458
458
459
459
nsapi_error_t AT_CellularContext::activate_ip_context ()
460
460
{
461
- return find_and_activate_context ();
461
+ nsapi_error_t ret = find_and_activate_context ();
462
+ #if !NSAPI_PPP_AVAILABLE
463
+ if (ret == NSAPI_ERROR_OK) {
464
+ pdpContextList_t params_list;
465
+ if (get_pdpcontext_params (params_list) == NSAPI_ERROR_OK) {
466
+ pdpcontext_params_t *pdp = params_list.get_head ();
467
+ while (pdp) {
468
+ SocketAddress addr;
469
+ if (addr.set_ip_address (pdp->dns_secondary_addr )) {
470
+ tr_info (" DNS secondary %s" , pdp->dns_secondary_addr );
471
+ add_dns_server (addr, get_interface_name (NULL ));
472
+ }
473
+ if (addr.set_ip_address (pdp->dns_primary_addr )) {
474
+ tr_info (" DNS primary %s" , pdp->dns_primary_addr );
475
+ add_dns_server (addr, get_interface_name (NULL ));
476
+ }
477
+ pdp = pdp->next ;
478
+ }
479
+ }
480
+ }
481
+ #endif
482
+ return ret;
462
483
}
463
484
464
485
nsapi_error_t AT_CellularContext::activate_non_ip_context ()
You can’t perform that action at this time.
0 commit comments