![](/media/cache/profiles/aa7fd480bd75d86948e7f7aac11d2704.jpg.50x50_q85.jpg)
support library for C027 helper functions for Buffer Pipes, Buffered Serial Port (rtos capable) and GPS parsing. It includes modem APIs for USSD, SMS and Sockets.
Fork of C027_Support by
Diff: MDM.cpp
- Revision:
- 107:436ee320efd6
- Parent:
- 106:18aeacdae391
- Child:
- 109:327d209a8ab9
--- a/MDM.cpp Tue Aug 12 08:43:15 2014 +0000 +++ b/MDM.cpp Sat Sep 13 16:05:07 2014 +0000 @@ -945,8 +945,8 @@ { bool ok = false; LOCK(); - TRACE("socketIsConnected(%d)\r\n", socket); ok = ISSOCKET(socket) && _sockets[socket].connected; + TRACE("socketIsConnected(%d) %s\r\n", socket, ok?"yes":"no"); UNLOCK(); return ok; } @@ -1122,9 +1122,12 @@ } } UNLOCK(); - if (!ok) + if (!ok) { + TRACE("socketRecv: ERROR\r\n"); return SOCKET_ERROR; + } } + TRACE("socketRecv: %d \"%*s\"\r\n", cnt, cnt, buf-cnt); return cnt; } @@ -1182,11 +1185,14 @@ } } UNLOCK(); - if (!ok) + if (!ok) { + TRACE("socketRecv: ERROR\r\n"); return SOCKET_ERROR; + } } timer.stop(); timer.reset(); + TRACE("socketRecv: %d \"%*s\"\r\n", cnt, cnt, buf-cnt); return cnt; }