LWM2M Weather Station

Dependencies:   EthernetInterfaceUpdate mbed-rtos mbed nanoservice_client_1_12_X

Revision:
2:d758d2248748
Parent:
0:2b74e0fc583d
--- a/nsdl_support.cpp	Tue Nov 25 01:44:53 2014 +0000
+++ b/nsdl_support.cpp	Sun Jan 18 18:38:37 2015 +0000
@@ -36,16 +36,16 @@
 void *nsdl_alloc(uint16_t size)
 {
     void *buf = malloc(size);
-    printf("alloc\r\n");
-    MEM_VALID(0);
+    //printf("alloc\r\n");
+    //MEM_VALID(0);
     return buf;
 }
 
 void nsdl_free(void* ptr_to_free)
 {
-    printf("de-alloc\r\n");
-    MEM_VALID(0);
     free(ptr_to_free);
+    //printf("de-alloc\r\n");
+    //MEM_VALID(0);
 }
 
 /*
@@ -131,30 +131,13 @@
     if (coap_packet_ptr->options_list_ptr && coap_packet_ptr->options_list_ptr->location_path_ptr)
     {
         pc.printf("Location: /");
-        int i;
-        for (i=0; i < coap_packet_ptr->options_list_ptr->location_path_len; i++) pc.printf("%c", (char)(coap_packet_ptr->options_list_ptr->location_path_ptr[i]));
+        for (int i=0; i < coap_packet_ptr->options_list_ptr->location_path_len; i++) pc.printf("%c", (char)(coap_packet_ptr->options_list_ptr->location_path_ptr[i]));
         pc.printf(" \r\n");
     }
-    //sn_coap_packet_debug(coap_packet_ptr);
+    //sn_coap_packet_debug(coap_packet_ptr); // need to enable in nsdl source code
     return 0;
 }
 
-static void registration_update_thread(void const *args)
-{
-    sn_nsdl_ep_parameters_s *endpoint_ptr = NULL;
-
-    while(true)
-    {
-        wait(RD_UPDATE_PERIOD);
-        endpoint_ptr = nsdl_init_register_endpoint(endpoint_ptr, (uint8_t*)null_ep_name, null_ep_type, null_lifetime_ptr);
-        if(sn_nsdl_update_registration(endpoint_ptr) != 0)            
-            pc.printf("NSP re-registering failed\r\n");
-        else
-            pc.printf("NSP re-registering OK\r\n");
-        nsdl_clean_register_endpoint(&endpoint_ptr);
-    }
-}
-
 void nsdl_init()
 {
     uint8_t nsp_addr[4];