fork

Files at this revision

API Documentation at this revision

Comitter:
rob.meades@u-blox.com
Date:
Fri Jun 30 13:29:19 2017 +0100
Parent:
6:63dad754c267
Child:
8:edac5187d765
Commit message:
Connect now fails correctly if it cannot achieve a connection, rather than trying for ever.

Changed in this revision

UbloxATCellularInterface.cpp Show annotated file Show diff for this revision Revisions of this file
UbloxATCellularInterface.h Show annotated file Show diff for this revision Revisions of this file
--- a/UbloxATCellularInterface.cpp	Thu Jun 15 14:04:26 2017 +0100
+++ b/UbloxATCellularInterface.cpp	Fri Jun 30 13:29:19 2017 +0100
@@ -225,12 +225,12 @@
  **********************************************************************/
 
 // Get the next set of credentials, based on IMSI.
-void UbloxATCellularInterface::get_next_credentials(const char * config)
+void UbloxATCellularInterface::get_next_credentials(const char ** config)
 {
-    if (config) {
-        _apn    = _APN_GET(config);
-        _uname  = _APN_GET(config);
-        _pwd    = _APN_GET(config);
+    if (*config) {
+        _apn    = _APN_GET(*config);
+        _uname  = _APN_GET(*config);
+        _pwd    = _APN_GET(*config);
     }
 
     _apn    = _apn     ?  _apn    : "";
@@ -364,7 +364,7 @@
             // Attempt to connect
             do {
                 // Set up APN and IP protocol for PDP context
-                get_next_credentials(config);
+                get_next_credentials(&config);
                 _auth = (*_uname && *_pwd) ? _auth : NSAPI_SECURITY_NONE;
                 if ((_dev_info.dev != DEV_TOBY_L2) && (_dev_info.dev != DEV_MPCI_L2)) {
                     success = activate_profile(_apn, _uname, _pwd, _auth);
--- a/UbloxATCellularInterface.h	Thu Jun 15 14:04:26 2017 +0100
+++ b/UbloxATCellularInterface.h	Fri Jun 30 13:29:19 2017 +0100
@@ -312,7 +312,7 @@
 
     /** Get the next set of credentials from the database.
      */
-    virtual void get_next_credentials(const char * config);
+    virtual void get_next_credentials(const char ** config);
 
     /** Activate one of the on-board modem's connection profiles.
      *