local fork
Dependencies: Socket USBHostWANDongle_bleedingedge lwip-sys lwip
Fork of VodafoneUSBModem_bleedingedge by
Diff: sms/SMSInterface.cpp
- Revision:
- 79:897a0de9d668
- Parent:
- 76:c0e63c16306e
diff -r ab4d6263f25c -r 897a0de9d668 sms/SMSInterface.cpp --- 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);