Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: UbloxATCellularInterface.cpp
- Revision:
- 15:8cc9a80ac0ad
- Parent:
- 14:e7dcf3388403
- Child:
- 16:2b30a056ae54
--- a/UbloxATCellularInterface.cpp Fri Mar 02 13:28:32 2018 +0000
+++ b/UbloxATCellularInterface.cpp Mon Mar 26 15:33:40 2018 +0100
@@ -561,6 +561,11 @@
MBED_ASSERT (check_socket(socket));
+ if (socket->modem_handle == SOCKET_UNUSED) {
+ tr_debug("socket_send: socket closed");
+ return NSAPI_ERROR_NO_SOCKET;
+ }
+
while ((count > 0) && success) {
if (count < blk) {
blk = count;
@@ -669,6 +674,11 @@
MBED_ASSERT (check_socket(socket));
+ if (socket->modem_handle == SOCKET_UNUSED) {
+ tr_debug("socket_recv: socket closed");
+ return NSAPI_ERROR_NO_SOCKET;
+ }
+
timer.start();
while (success && (size > 0)) {