Core Base Classes for the Light Endpoints

Dependencies:   BufferedSerial

Dependents:   mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet ... more

Revision:
33:339eb862a4c4
Parent:
29:9a99f076129a
Child:
87:e9d77e9f9eae
diff -r 56a11a9a35a2 -r 339eb862a4c4 PhilipsLight.cpp
--- a/PhilipsLight.cpp	Fri Feb 28 05:19:52 2014 +0000
+++ b/PhilipsLight.cpp	Fri Feb 28 18:08:03 2014 +0000
@@ -63,7 +63,8 @@
      this->logger()->log("Setting Philips light: %d payload: %s",this->m_id,this->m_payload);
      
      // issue the PUT
-     bool success = transport->httpPut(this->m_url,this->m_payload,PL_PAYLOAD_BUFFER_LEN,this->m_response,PL_RESPONSE_BUFFER_LEN);
+     bool success = false;
+     if (transport != NULL) transport->httpPut(this->m_url,this->m_payload,strlen(this->m_payload),this->m_response,PL_RESPONSE_BUFFER_LEN);
      
      // DEBUG
      if (success) this->logger()->log("Philips Light: %d updated successfully",this->m_id);