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.
Dependencies: Socket USBHostWANDongle lwip-sys lwip
Fork of VodafoneUSBModem by
Diff: sms/SMSInterface.cpp
- Revision:
- 91:7b311719374d
- Parent:
- 83:897a0de9d668
diff -r f8d65dc86a97 -r 7b311719374d sms/SMSInterface.cpp
--- a/sms/SMSInterface.cpp Thu Jun 27 12:16:30 2013 +0000
+++ b/sms/SMSInterface.cpp Fri Sep 20 10:40:58 2013 +0000
@@ -103,6 +103,8 @@
}
DBG("SM sent");
+ // since unsolicited events are blocked during send SM events,it makes sense to update the mailbox
+ m_needsUpdate = true;
m_state = SMS_IDLE;
return OK;
}
@@ -281,7 +283,7 @@
{
int crPos = crPtr - m_msg;
//Replace m_inputBuf[crPos] with null-terminating char
- m_msg[crPos] = '\x0';
+ m_msg[crPos] = '\0';
//If there is a CR char, split message there
@@ -363,7 +365,8 @@
//Get index
int msgRef;
- if( std::sscanf(evt, "\"SM\",%d", &msgRef) == 1 )
+ if(( std::sscanf(evt, "\"SM\",%d", &msgRef) == 1 ) ||
+ ( std::sscanf(evt, "\"ME\",%d", &msgRef) == 1 )) // ublox modules preferentially use ME for storage
{
DBG("Adding message to list (ref %d)", msgRef);
if(m_inboxMtx.trylock())
