mqtt specific components for the impact mbed endpoint library
Dependents: mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_mqtt_endpoint_nxp
Revision 27:bb4253d9f1d0, committed 2014-04-03
- Comitter:
- ansond
- Date:
- Thu Apr 03 00:50:43 2014 +0000
- Parent:
- 26:b9d74e06b3de
- Child:
- 28:6cdbaf2aa697
- Commit message:
- updates
Changed in this revision
MBEDEndpoint.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/MBEDEndpoint.cpp Wed Apr 02 18:36:47 2014 +0000 +++ b/MBEDEndpoint.cpp Thu Apr 03 00:50:43 2014 +0000 @@ -45,7 +45,7 @@ memset(this->m_gw_address,0,PREFERENCE_VALUE_LEN+1); for(int i=0;i<NUM_TRANSPORTS;++i) this->m_transports[i] = NULL; this->logger()->setEndpoint((void *)this); - this->setEndpoint(new IOCEndpoint(this->logger(),(void *)this)); + this->setEndpoint(new IOCEndpoint(error_handler,(void *)this)); if (success) this->initPreferences(); if (success) this->initEndpointName(); if (success) this->logger()->turnLEDBlue(); @@ -69,7 +69,7 @@ if (success) this->logger()->turnLEDYellow(); if (success)this->m_map = new MBEDToIOCResourceMap(error_handler); if (success) success = this->initializeTransports(); - if (success) success = this->initializePersonalities(); + if (success) success = this->initializePersonalities(); if (success) this->logger()->turnLEDOrange(); this->logger()->lcdStatusOnly(true); if (!success) closedown(2); @@ -99,7 +99,12 @@ MBEDToIOCResourceMap *MBEDEndpoint::getMap() { return this->m_map; } // initialize our preferences - void MBEDEndpoint::initPreferences() { if (this->m_preferences == NULL) this->m_preferences = new Preferences(this->logger()); if (this->m_preferences != NULL) this->m_preferences->fixCoordsForIOC(); } + void MBEDEndpoint::initPreferences() { + if (this->m_preferences == NULL) + this->m_preferences = new Preferences(this->logger()); + if (this->m_preferences != NULL) + this->m_preferences->fixCoordsForIOC(); + } // get our preferences Preferences *MBEDEndpoint::preferences() { return this->m_preferences; }