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:
- 83:897a0de9d668
- Parent:
- 80:c0e63c16306e
- Child:
- 91:7b311719374d
--- a/sms/SMSInterface.cpp Tue Jan 29 13:49:23 2013 +0000
+++ b/sms/SMSInterface.cpp Tue Mar 05 14:54:15 2013 +0000
@@ -33,6 +33,7 @@
SMSInterface::SMSInterface(ATCommandsInterface* pIf) : m_pIf(pIf), m_msg(NULL), m_maxMsgLength(0), m_msisdn(NULL)
{
+ DBG("registering sms");
m_pIf->registerEventsHandler(this); //Add us to the unsolicited result codes handlers
}
@@ -240,8 +241,9 @@
}
else if(m_state == SMS_GET_HDR_RECEIVED)
{
- DBG("Message: %s", line);
+
size_t cpyLen = MIN( std::strlen(line), m_maxMsgLength - 1 );
+ DBG("Message: %s (%d)", line, cpyLen);
std::memcpy( m_msg, line, cpyLen );
m_msg[cpyLen] = '\0';
m_state = SMS_CMD_PROCESSED;
@@ -356,7 +358,6 @@
{
return; //Not supported
}
-
DBG("Unsollicited result code: %s - %s", atCode, evt);
