diff --git a/Project/applications/smartcities/buffer.c b/Project/applications/smartcities/buffer.c index 10e96e9..c3994f2 100644 --- a/Project/applications/smartcities/buffer.c +++ b/Project/applications/smartcities/buffer.c @@ -9,7 +9,6 @@ char** put_message(char* info, char** buf,uint32_t *index, uint32_t *buf_len) { char** buffer = join_buf(buf, buf_len); buffer[*index] = chHeapAlloc(NULL,strlen(info)+1); - printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,strlen(info)+1,buffer[*index],0x1B); strcpy(buffer[*index],info); DBG_BUFFER("Data copied\r\n"); i = *index+1; @@ -20,7 +19,6 @@ char** put_message(char* info, char** buf,uint32_t *index, uint32_t *buf_len) { DBG_BUFFER("%c[1;31m[ERROR] WTF in put_message%c[1;00m\r\n",0x1B,0x1B); buf[*index] = chHeapAlloc(NULL,strlen(info)+1); - printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,strlen(info)+1,buf[*index],0x1B); buf[*index] = info; i = *index+1; *index = i; @@ -60,7 +58,6 @@ int send(char** buf, uint32_t *index, uint32_t *size_buf, char *provider_ID, cha } uint8_t res = send_json(statement, size, provider_ID, sensor_ID); chHeapFree(statement); - printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,statement,0x1B); int i; if(res==JSON_POST_OK) { @@ -68,12 +65,10 @@ int send(char** buf, uint32_t *index, uint32_t *size_buf, char *provider_ID, cha for(i=0;i<*index;i++) { chHeapFree(buf[i]); - printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,buf[i],0x1B); } if(buf!=NULL) { chHeapFree(buf); - printf("%c[1;32m[FREE] Freed bytes from %08x%c[1;00m\r\n",0x1B,buf,0x1B); } *index=0; *size_buf=0; @@ -87,20 +82,16 @@ char** join_buf(char** buf, uint32_t *buf_len) char** n_buf; int len = *buf_len; n_buf = chHeapAlloc (NULL,sizeof (char *) * (len+1)); - printf("%c[1;31m[ALLOC] Allocated %d bytes to %08x%c[1;00m\r\n",0x1B,sizeof(char*) * (len+1),n_buf,0x1B); int i; for(i=0; i