MBED_DEMOS / Mbed 2 deprecated mbed_mqtt_endpoint_nxp

Dependencies:   C12832_lcd EthernetInterface StatusReporter LM75B MQTT-ansond endpoint_core endpoint_mqtt mbed-rtos mbed

Revision:
6:34c07e145caa
Parent:
3:3db076b9d380
Child:
7:f570eb3f38cd
--- a/MBEDEndpoint.cpp	Wed Feb 26 05:45:49 2014 +0000
+++ b/MBEDEndpoint.cpp	Wed Feb 26 07:22:34 2014 +0000
@@ -90,7 +90,7 @@
  ResourceFactory *MBEDEndpoint::initResourceFactory() { return new EmulatedResourceFactory(this->logger()); }
  
  // get our endpoint name (first light name)
- char *MBEDEndpoint::getEndpointName() { return "light-4"; } // return this->m_lights[0]->getName(); }
+ char *MBEDEndpoint::getEndpointName() { return this->m_lights[0]->getName(); }
  
  // initialize a specific transport
  bool MBEDEndpoint::initializeTransport(int index,char *key,Transport *transport) {
@@ -98,6 +98,7 @@
      if (this->m_transports[index] == NULL) {
           this->logger()->log("Initializing %s Transport...", key);
           this->m_transports[index] = transport;
+          transport->setEndpoint(this);
           if (this->m_transports[index] != NULL) success = this->m_transports[index]->connect();
       }
       else {