added max-age and content-format

Fork of mbedConnectorInterface by Doug Anson

Revision:
29:2f33650ca800
Parent:
19:e2cbaeeea509
Child:
48:4b9ee3e32f93
--- a/api/Utils.cpp	Wed Mar 25 16:58:41 2015 +0000
+++ b/api/Utils.cpp	Wed Apr 01 04:33:19 2015 +0000
@@ -90,9 +90,12 @@
     // with options, lets set the underlying NSDL globals...
     logger.log("utils_configure_endpoint: finalizing configuration...");
     memcpy(NSP_address_bytes,options->getNSPAddress(),NSP_IP_ADDRESS_LENGTH);
+    memset(endpoint_name,0,NODE_NAME_LENGTH);
     memcpy(endpoint_name,options->getEndpointNodename().c_str(),options->getEndpointNodename().size());
+    memset(domain_name,0,NSP_DOMAIN_LENGTH);
     memcpy(domain_name,options->getDomain().c_str(),options->getDomain().size());
     nsp_port = options->getNSPPortNumber();
+    memset(ep_type,0,NSP_ENDPOINT_TYPE_LENGTH);
     memcpy(ep_type,options->getEndpointType().c_str(),options->getEndpointType().size());
     memcpy(lifetime_ptr,options->getLifetime(),NSP_LIFE_TIME_LENGTH);
     memcpy(app_MAC_address,options->getMACAddress(),NODE_MAC_ADDRESS_LENGTH); // TODO: arm_ns_tasklet_create() should call Endpoint::plumbNetwork()... currently its called before this MAC address can be (re)set