Cellular example code for Seeed Wio 3G

Fork of Wio_3G-example-cellular by Toyomasa Watarai

Files at this revision

API Documentation at this revision

Comitter:
mbed_official
Date:
Thu Jun 21 12:15:21 2018 +0100
Parent:
12:393c693226f4
Child:
14:f7562c198fd8
Commit message:
Merge pull request #89 from ARMmbed/iface_null_in_dot_thread

Fixed crash bug in dot_event() where interface could have been called?
.
Commit copied from https://github.com/ARMmbed/mbed-os-example-cellular

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Jun 20 07:30:21 2018 +0100
+++ b/main.cpp	Thu Jun 21 12:15:21 2018 +0100
@@ -106,13 +106,13 @@
 {
     while (true) {
         Thread::wait(4000);
-        if (!iface->is_connected()) {
+        if (iface && iface->is_connected()) {
+            break;
+        } else {
             trace_mutex.lock();
             printf(".");
             fflush(stdout);
             trace_mutex.unlock();
-        } else {
-            break;
         }
     }
 }