Vodafone K3770/K3772-Z modems driver & networking library
Dependencies: Socket USBHostWANDongle lwip-sys lwip
Dependents: VodafoneUSBModemHTTPClientTest VodafoneUSBModemNTPClientTest VodafoneUSBModemSMSTest VodafoneUSBModemUSSDTest ... more
Fork of VodafoneUSBModem_bleedingedge by
This is the driver for the Vodafone K3700 & K3772-Z Dongles:
More details and instructions can be found here.
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);