mbed Connector Interface simplification API on top of mbed-client
Fork of mbedConnectorInterfaceV3 by
NOTE:
This repo has been replaced with https://github.com/ARMmbed/mbedConnectorInterface. No further updates will occur with this repo. Please use the github repo instead. Thanks!
Diff: source/ConnectorEndpoint.cpp
- Revision:
- 90:cff3317ad4b0
- Parent:
- 89:ccd22d25f431
- Child:
- 96:73a85768f235
--- a/source/ConnectorEndpoint.cpp Fri Nov 04 23:58:52 2016 +0000 +++ b/source/ConnectorEndpoint.cpp Wed Feb 15 16:17:09 2017 +0000 @@ -215,7 +215,6 @@ this->m_endpoint_interface->on_unregistered(&Connector::Endpoint::on_unregistered); this->m_endpoint_interface->on_error(&Connector::Endpoint::on_error); this->m_endpoint_interface->set_update_callback(this); - this->m_endpoint_interface->setup(__network_interface); } } #else @@ -453,8 +452,11 @@ void Endpoint::register_endpoint(M2MSecurity *endpoint_security, M2MObjectList endpoint_objects) { #ifdef ENABLE_MBED_CLOUD_SUPPORT if (this->m_endpoint_interface != NULL) { + this->logger()->log("Connector::Endpoint(Cloud): adding objects to endpoint..."); + this->m_endpoint_interface->add_objects(endpoint_objects); + this->logger()->log("Connector::Endpoint(Cloud): registering endpoint..."); - this->m_endpoint_interface->add_objects(endpoint_objects); + this->m_endpoint_interface->setup(__network_interface); } #else if (this->m_endpoint_interface != NULL && endpoint_security != NULL && endpoint_objects.size() > 0) {